File Upload Problem - java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem
238 views
Skip to first unread message
Nishant
unread,
Mar 22, 2012, 11:59:36 AM3/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hi,
I have problem with the File Upload in GWT using the Apache Commons File Upload.
I am using Windows XP + Eclipse Indigo + GWT for Eclipse Indigo. I have the following jars in my Build Path and the war/WEB-INF/lib commons-fileupload-1.2.3.jar commons-io-2.1.jar
But every time I try to upload a file I get one of the following errors
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java: 199) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java: 361) at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java: 126) at com.tibco.gwt.server.FileUploadServlet.doPost(FileUploadServlet.java: 28)
or
java.lang.NoClassDefFoundError: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) at org.apache.commons.fileupload.disk.DiskFileItem.<clinit>(DiskFileItem.java: 109) at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java: 199) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java: 361) at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java: 126) at com.tibco.gwt.server.FileUploadServlet.doPost(FileUploadServlet.java: 28)
The error is always at the following line: // Parse the request List /* FileItem */ items = upload.parseRequest(request);
Can any of you experts let me the solution for this problem.