Discussion:
FileUpload help! NoClassDefFoundError org.apache.commons.fileupload.disk.DiskFileItem
DeliveryNinja
2010-04-27 15:58:04 UTC
Permalink
I've recently been building some blogging software just to brush up on
my skills and I wanted to add file upload to new posts.

I created a servlet which will get the post request from the file
upload box.

What happens then is I get the following stack trace

java.lang.NoClassDefFoundError: Could not initialize class
org.apache.commons.fileupload.disk.DiskFileItem
at
org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:
196)
at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:
358)
at
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:
126)
at blogger.server.FileUpload.getFileItem(FileUpload.java:77)

I have not edited any xml files and I'm using commons-
fileupload-1.2.1.jar and commons-io-1.4.jar but i'm only using them in
a class called FileUpload in the server package of my GWT application.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Sripathi Krishnan
2010-04-28 20:42:57 UTC
Permalink
Do you have Google App Engine enabled? If so, please disable it in your
project preferences. GAE does not allow you to write to the disk or open
socket connections.


--Sri
Post by DeliveryNinja
I've recently been building some blogging software just to brush up on
my skills and I wanted to add file upload to new posts.
I created a servlet which will get the post request from the file
upload box.
What happens then is I get the following stack trace
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.commons.fileupload.disk.DiskFileItem
at
196)
at
358)
at
126)
at blogger.server.FileUpload.getFileItem(FileUpload.java:77)
I have not edited any xml files and I'm using commons-
fileupload-1.2.1.jar and commons-io-1.4.jar but i'm only using them in
a class called FileUpload in the server package of my GWT application.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Manuel Carrasco Moñino
2010-04-29 10:17:45 UTC
Permalink
The message is clear, you don't have commons-fileupload-1.2.jar in
your classpath.

-Manolo
Post by DeliveryNinja
I've recently been building some blogging software just to brush up on
my skills and I wanted to add file upload to new posts.
I created a servlet which will get the post request from the file
upload box.
What happens then is I get the following stack trace
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.commons.fileupload.disk.DiskFileItem
       at
196)
       at
358)
       at
126)
       at blogger.server.FileUpload.getFileItem(FileUpload.java:77)
I have not edited any xml files and I'm using commons-
fileupload-1.2.1.jar and commons-io-1.4.jar but i'm only using them in
a class called FileUpload in the server package of my GWT application.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Loading...