java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException

1,425 views
Skip to first unread message

Henry

unread,
Dec 8, 2009, 7:42:29 PM12/8/09
to Google Web Toolkit
Hi Guys,

I'm trying to upload a file to the server following the common
examples of "FileUpload" and I have the following error:

java.lang.NoClassDefFoundError: org/apache/commons/fileupload/
FileUploadException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.ServletHolder.getServlet
(ServletHolder.java:339)
.......

I can put my code, but the problem is in the server side, concretely
when I use the classes that required from the package commons-
fileupload.jar, for example this import:

import org.apache.commons.fileupload.FileUploadException;

Im running the application in host mode, but ive tried to deploy it to
Google App Engine, and i've the same error. If I dont use that package
in my server class the calls work good, so the problem must to be king
of configuration about classpath or something...

Does anyone know how to configure my eclipse to fix this error?

Thanks in advance.

charlie

unread,
Dec 8, 2009, 8:28:33 PM12/8/09
to google-we...@googlegroups.com
You have mentioned that you have the commons FileUpload jar in WEB-INF/lib , you're positive that it's there and getting deployed ?


--

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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



charlie

unread,
Dec 8, 2009, 8:28:51 PM12/8/09
to google-we...@googlegroups.com
Err, haven't .

Henry

unread,
Dec 9, 2009, 5:52:04 AM12/9/09
to Google Web Toolkit
I've these jars in the built path of the eclipse:

commons-codec-1.4.jar
commons-fileupload-1.2.1.jar
commons-io-1.4.jar

The project on the eclipse compiles without problems, but when im
trying to run it on hostmode or deploying it at Google App Engine this
classes are not found...probably i've to put this jars to another
place or configure something to allow found them running the
application, but I don't know where.

On Dec 9, 1:28 am, charlie <charlie.f...@gmail.com> wrote:
> Err, haven't .
>
> On Tue, Dec 8, 2009 at 7:28 PM, charlie <charlie.f...@gmail.com> wrote:
> > You have mentioned that you have the commons FileUpload jar in WEB-INF/lib
> > , you're positive that it's there and getting deployed ?
>
> >> google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> >> .

bch...@gmail.com

unread,
Dec 9, 2009, 6:16:32 AM12/9/09
to Google Web Toolkit
As the previous post mentioned, these jar files should be in your war
application's "WEB-INF/lib" director.

Henry

unread,
Dec 9, 2009, 7:26:40 AM12/9/09
to Google Web Toolkit
Oks :-), but running gwt in host mode, do where I've to move this jar
files? Where is placed the internal tomcat shipped with GWT?
Or I've to configure something else in the eclipse or in the GWT
project to be able to run in host mode?
Reply all
Reply to author
Forward
0 new messages