You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Joel Wiegman (JIRA)" <de...@tapestry.apache.org> on 2008/10/07 18:34:44 UTC

[jira] Created: (TAPESTRY-2705) Exceeding file size limit throws uncatchable RuntimeException

Exceeding file size limit throws uncatchable RuntimeException
-------------------------------------------------------------

                 Key: TAPESTRY-2705
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2705
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-upload
         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
            Reporter: Joel Wiegman
             Fix For: 5.0.14


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-272) File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643674#action_12643674 ] 

Howard M. Lewis Ship commented on TAP5-272:
-------------------------------------------

Final solution is to notify the containing page with an uploadException event, let it decide what to do.

> File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2705) Exceeding file size limit throws uncatchable RuntimeException

Posted by "Joel Wiegman (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joel Wiegman updated TAPESTRY-2705:
-----------------------------------

        Fix Version/s:     (was: 5.0.14)
    Affects Version/s: 5.0.14

> Exceeding file size limit throws uncatchable RuntimeException
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2705
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2705
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-upload
>    Affects Versions: 5.0.14
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Reopened: (TAP5-272) File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

Posted by "Joel Wiegman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joel Wiegman reopened TAP5-272:
-------------------------------


After working with the solution for this bug, it appears to be inconvenient.

The uploadException appears to get thrown before the values from the form are bound to the page instance.  So if I have the following code to handle the uploadException:

	public Object onUploadException(Throwable cause) {
		myForm.recordError("Files may not be larger than 1.5 MB.  Please choose a smaller file.");
		return this;
	}

... then the page is completely empty when the user is returned to the page.

Most (all?) people would treat this as a validation error when the file size is exceeded.  

I'm hoping that we end up with something like this:

<input t:type="upload" t:id="file" validate="required" maxsize="1500000"/>

And a default error message similar to the one above would be returned to the user.  

Feasible?

> File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAP5-272) File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-272.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.16

> File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAP5-272) File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-272.
-------------------------------------

    Resolution: Fixed

The change you want would be nice, but is simply not possible. The form data is either available or not; if there's a file upload exception, then none of the data submitted in the form is available to Tapestry. This is a function of the multipart/form encoding type and the underlying Jakarta FileUpload library.

> File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-272) Exceeding file size limit throws uncatchable RuntimeException

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643248#action_12643248 ] 

Howard M. Lewis Ship commented on TAP5-272:
-------------------------------------------

The only solution I can see for this is to add an "incomplete" flag to the UploadedFile interface.  I believe that once we hit this exception, we can't count on getting any other uploaded files, or potentially, any of the other query parameters.  Possibly the correct course is to identify the page, and trigger a specific event to indicate the failure.

> Exceeding file size limit throws uncatchable RuntimeException
> -------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAP5-272) File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-272:
--------------------------------------

    Summary: File uploads that exceed the upload limit throw an uncatchable exception; Tapestry should notify the page about the exception  (was: 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
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAP5-272) Exceeding file size limit throws uncatchable RuntimeException

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-272:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> Exceeding file size limit throws uncatchable RuntimeException
> -------------------------------------------------------------
>
>                 Key: TAP5-272
>                 URL: https://issues.apache.org/jira/browse/TAP5-272
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: Windows XP, Java 1.6, Sun Java Application Server 9.1
>            Reporter: Joel Wiegman
>            Assignee: Howard M. Lewis Ship
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org