geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan" <paulmcma...@gmail.com>
Subject Re: NoClassDefFoundError when using FileUpload
Date Mon, 22 May 2006 19:31:53 GMT
Hi,  I tried to recreate the error you're seeing using the following steps.

1.)  downloaded struts 1.2.9 src
2.)  modified the file upload sample to throw & catch an instance of
org.apache.commons.fileupload.FileUploadException
3.)  compiled the sample and deployed in geronimo 1.0 (deployment plan
is attached, its pretty standard)
4.)  uploaded a file using the upload sample, exception was thrown and
caught as expected

You may want to have a look at how the upload example WAR file from
struts.apache.org is packaged.  It has a copy of commons fileupload
v1.0 in its WEB-INF/lib, which seems to work OK in geronimo.

Best wishes,
Paul

On 5/19/06, kbaxi@symcor.com <kbaxi@symcor.com> wrote:
> Hello,
>
> I am getting following error when using FormFile in the form and struts
> action of Common-fileupload-1.0.jar:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/FileUploadException
>       at java.lang.Class.getDeclaredConstructors0(Native Method)
>       at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
>       at java.lang.Class.getConstructor0(Class.java:1930)
>       at java.lang.Class.newInstance0(Class.java:278)
>       at java.lang.Class.newInstance(Class.java:261)
>       at
> org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
>       at
> org.apache.struts.util.RequestUtils.getMultipartHandler(RequestUtils.java:1318)
>       at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1194)
>       at
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
>       at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
>       at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>       at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>       at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>       at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>       at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:272)
>       at
> org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53)
>       at
> org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
>       at
> org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60)
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>       at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
>       at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>       at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>       at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>       at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>       at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>       at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>       at java.lang.Thread.run(Thread.java:534)
>
> Thanks,
> Kenil
>
>

Mime
View raw message