Tapestry
  1. Tapestry
  2. TAPESTRY-957

When trying to upload a file that is greater that the set maxSize an uncatchable exception is thrown

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      OS: Windows XP
      WebServer: Tomcat
      IDE: Eclipse

      Description

      Following the example as given on the tapestry web-site I attempted to set the maximum size of file that could be uploaded on a given web page (using the @Upload component), and after some initial difficulties I finally managed to get it to work, well kind of work. The problem is that when it correctly detects that the file is greater than a permitted size it throws an uncatchable exception (I have a try-catch-finally around my upload java code).

      The exception thrown was :

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: Unable to decode multipart encoded request: the request was rejected because its size (330476) exceeds the configured maximum (300000)
      net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:233)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:324)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)

      root cause

      org.apache.hivemind.ApplicationRuntimeException: Unable to decode multipart encoded request: the request was rejected because its size (330476) exceeds the configured maximum (300000)
      org.apache.tapestry.multipart.MultipartDecoderImpl.decode(MultipartDecoderImpl.java:56)
      $ServletMultipartDecoder_10b5c745c6f.decode($ServletMultipartDecoder_10b5c745c6f.java)
      $ServletMultipartDecoder_10b5c745c70.decode($ServletMultipartDecoder_10b5c745c70.java)
      org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:50)
      $ServletRequestServicerFilter_10b5c745cad.service($ServletRequestServicerFilter_10b5c745cad.java)
      $ServletRequestServicer_10b5c745cb5.service($ServletRequestServicer_10b5c745cb5.java)
      org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      $ServletRequestServicerFilter_10b5c745cb1.service($ServletRequestServicerFilter_10b5c745cb1.java)
      $ServletRequestServicer_10b5c745cb5.service($ServletRequestServicer_10b5c745cb5.java)
      $ServletRequestServicer_10b5c745ca7.service($ServletRequestServicer_10b5c745ca7.java)
      org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
      net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:324)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)

      root cause

      org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (330476) exceeds the configured maximum (300000)
      org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:310)
      org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
      org.apache.tapestry.multipart.MultipartDecoderImpl.decode(MultipartDecoderImpl.java:50)
      $ServletMultipartDecoder_10b5c745c6f.decode($ServletMultipartDecoder_10b5c745c6f.java)
      $ServletMultipartDecoder_10b5c745c70.decode($ServletMultipartDecoder_10b5c745c70.java)
      org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:50)
      $ServletRequestServicerFilter_10b5c745cad.service($ServletRequestServicerFilter_10b5c745cad.java)
      $ServletRequestServicer_10b5c745cb5.service($ServletRequestServicer_10b5c745cb5.java)
      org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      $ServletRequestServicerFilter_10b5c745cb1.service($ServletRequestServicerFilter_10b5c745cb1.java)
      $ServletRequestServicer_10b5c745cb5.service($ServletRequestServicer_10b5c745cb5.java)
      $ServletRequestServicer_10b5c745ca7.service($ServletRequestServicer_10b5c745ca7.java)
      org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
      net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:324)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
      net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)

      note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian Long
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development