File Upload Problem Urgent

Discussions

Web tier: servlets, JSP, Web frameworks: File Upload Problem Urgent

  1. File Upload Problem Urgent (1 messages)

    Hi Friends,
       Iam getting the following exception while uploading file on Tomcat 5.0 server. Iam not able to get any workaround for this yet. Please help me out with it.

    Thanks in advance,
    Mohit.


    2003-12-10 09:40:46 ContextListener: contextInitialized()
    2003-12-10 09:40:46 SessionListener: contextInitialized()
    2003-12-10 09:40:47 ContextListener: contextInitialized()
    2003-12-10 09:40:47 SessionListener: contextInitialized()
    2003-12-10 09:58:20 ContextListener: contextInitialized()
    2003-12-10 09:58:21 SessionListener: contextInitialized()
    2003-12-10 09:58:21 ContextListener: contextInitialized()
    2003-12-10 09:58:21 SessionListener: contextInitialized()
    2003-12-10 09:58:21 SessionListener: contextDestroyed()
    2003-12-10 09:58:21 ContextListener: contextDestroyed()
    2003-12-10 09:58:21 SessionListener: contextDestroyed()
    2003-12-10 09:58:21 ContextListener: contextDestroyed()
    2003-12-10 09:59:11 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)V
    at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:219)
    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1055)
    at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:594)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
    at java.lang.Thread.run(Thread.java:536)

    Threaded Messages (1)

  2. File Upload Problem Urgent[ Go to top ]

    Please note that I've not used the commons files but the following bit of the error stack:

    java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)

    leads me to believe that you need to check your code. It says that the FileUpload class does not have a setSizeMax() method. Maybe it's setMaxSize(int)?

    Give that a shot.