Tapestry 5
  1. Tapestry 5
  2. TAP5-272

File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.16
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Java 1.6, Sun Java Application Server 9.1

      Description

      When including the following code in my app module to limit file size on an upload:

      public void contributeApplicationDefaults(MappedConfiguration<String, String> configuration)

      { configuration.add(UploadSymbols.FILESIZE_MAX, "1500000"); }

      An following internal Tapestry exception gets thrown to the application server VM, which is of course uncatchable in application code.

      [#|2008-10-07T12:27:17.904-0400|SEVERE|Servlet.service() for servlet default threw exception
      java.lang.RuntimeException: Unable to decode multipart encoded request.
      at org.apache.tapestry5.upload.internal.services.MultipartDecoderImpl.parseRequest(MultipartDecoderImpl.java:116)
      at org.apache.tapestry5.upload.internal.services.MultipartDecoderImpl.decode(MultipartDecoderImpl.java:94)
      at $MultipartDecoder_11cd7ca67c8.decode($MultipartDecoder_11cd7ca67c8.java)
      at $MultipartDecoder_11cd7ca668e.decode($MultipartDecoder_11cd7ca668e.java)
      at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:41)
      at $HttpServletRequestHandler_11cd7ca6691.service($HttpServletRequestHandler_11cd7ca6691.java)
      at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
      at $HttpServletRequestFilter_11cd7ca668f.service($HttpServletRequestFilter_11cd7ca668f.java)
      at $HttpServletRequestHandler_11cd7ca6691.service($HttpServletRequestHandler_11cd7ca6691.java)
      at $HttpServletRequestHandler_11cd7ca668d.service($HttpServletRequestHandler_11cd7ca668d.java)
      at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:177)
      ......
      Caused by: org.apache.commons.fileupload.FileUploadBase$FileSizeLimitExceededException: The field fileToUpload exceeds its maximum permitted size of 1500000 characters.
      at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl$FileItemStreamImpl$1.raiseError(FileUploadBase.java:645)
      at org.apache.commons.fileupload.util.LimitedInputStream.checkLimit(LimitedInputStream.java:71)
      at org.apache.commons.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:128)
      at java.io.FilterInputStream.read(FilterInputStream.java:90)
      at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
      at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
      at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354)
      at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
      at org.apache.tapestry5.upload.internal.services.MultipartDecoderImpl.parseRequest(MultipartDecoderImpl.java:112)
      ... 61 more

        Issue Links

          Activity

          Jochen Kemnade made changes -
          Link This issue is related to TAP5-2394 [ TAP5-2394 ]
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Joel Wiegman made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.0.16 [ 12313427 ]
          Howard M. Lewis Ship made changes -
          Summary Exceeding file size limit throws uncatchable RuntimeException File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Component/s tapestry-upload [ 12311811 ]
          Key TAPESTRY-2705 TAP5-272
          Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
          Affects Version/s 5.0.14 [ 12313214 ]
          Joel Wiegman made changes -
          Field Original Value New Value
          Affects Version/s 5.0.14 [ 12313214 ]
          Fix Version/s 5.0.14 [ 12313214 ]
          Joel Wiegman created issue -

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Joel Wiegman
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development