Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-1694

cannot upload file using struts1.1 final + commons fileupload1.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 1.1.0
    • None
    • Core
    • None
    • Operating System: All
      Platform: Other
    • 22517

    Description

      Issue:I get an exception (stack trace given below), while i try to upload a
      file using struts + commons fileupload1.0.jar.

      Additional info: I'm using weblogic 8.1, struts final 1.1.

      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:760)
      at
      com.tavant.lg.controller.servlet.LoanGeniusFrontControllerServlet.service
      (LoanGeniusFrontControllerServlet.java:81)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
      (ServletStubImpl.java:1053)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet
      (ServletStubImpl.java:387)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet
      (ServletStubImpl.java:305)
      at
      weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
      (WebAppServletContext.java:6291)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs
      (AuthenticatedSubject.java:317)
      at weblogic.security.service.SecurityManager.runAs
      (SecurityManager.java:97)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet
      (WebAppServletContext.java:3575)
      at weblogic.servlet.internal.ServletRequestImpl.execute
      (ServletRequestImpl.java:2573)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

      ==================

      My finding:
      I tried to see the code (using a demo java decompiler) of
      CommonsMultipartRequestHandler and FileUpload classes. I found that the
      CommonsMultipartRequestHandler.handleRequest() method passes an integer to
      FileUpload.setSizeMax() method, which is actually defined in its base,i.e.
      FileUploadBase.class, but this method in base requires a long. That's it....

      Please tell me if i'm wrong (which i'd happy to be), and suggest any
      solution/workaround. I can't move forward...
      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pkalwar@rediffmail.com pkalwar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: