You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ivan Vasilev (JIRA)" <ji...@apache.org> on 2010/09/23 23:14:34 UTC

[jira] Created: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

FileUploadException is masked behind WicketRuntimeException and not handled by a Form
-------------------------------------------------------------------------------------

                 Key: WICKET-3078
                 URL: https://issues.apache.org/jira/browse/WICKET-3078
             Project: Wicket
          Issue Type: Bug
          Components: wicket, wicket-extensions
         Environment: Widnows, Jetty 7
            Reporter: Ivan Vasilev


I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
    fileUploadForm.setMultiPart(true);
    fileUploadForm.setMaxSize(Bytes.kilobytes(150));

When the form is submitted with a file larger than 150K the following methods are called:
    fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it

		try
		{
			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
		}
		catch (FileUploadException e)
		{
			throw new WicketRuntimeException(e);
		}

When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 

I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.


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


[jira] Assigned: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

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

Martin Grigorov reassigned WICKET-3078:
---------------------------------------

    Assignee: Martin Grigorov

> FileUploadException is masked behind WicketRuntimeException and not handled by a Form
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3078
>                 URL: https://issues.apache.org/jira/browse/WICKET-3078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-M2.1
>         Environment: Widnows, Jetty 7
>            Reporter: Ivan Vasilev
>            Assignee: Martin Grigorov
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
>     fileUploadForm.setMultiPart(true);
>     fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods are called:
>     fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> 		try
> 		{
> 			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
> 		}
> 		catch (FileUploadException e)
> 		{
> 			throw new WicketRuntimeException(e);
> 		}
> When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 
> I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.

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


[jira] Commented: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914856#action_12914856 ] 

Hudson commented on WICKET-3078:
--------------------------------

Integrated in Apache Wicket 1.5.x #362 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/362/])
    WICKET-3078 FileUploadException is masked behind WicketRuntimeException and not handled by a Form

Cleanup UploadWebRequest.


> FileUploadException is masked behind WicketRuntimeException and not handled by a Form
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3078
>                 URL: https://issues.apache.org/jira/browse/WICKET-3078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-M2.1
>         Environment: Widnows, Jetty 7
>            Reporter: Ivan Vasilev
>            Assignee: Martin Grigorov
>             Fix For: 1.5-M3
>
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
>     fileUploadForm.setMultiPart(true);
>     fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods are called:
>     fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> 		try
> 		{
> 			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
> 		}
> 		catch (FileUploadException e)
> 		{
> 			throw new WicketRuntimeException(e);
> 		}
> When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 
> I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.

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


[jira] Resolved: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

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

Martin Grigorov resolved WICKET-3078.
-------------------------------------

    Fix Version/s: 1.5-M3
       Resolution: Fixed

Fixed with r1001242.
1.4.x works fine.

> FileUploadException is masked behind WicketRuntimeException and not handled by a Form
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3078
>                 URL: https://issues.apache.org/jira/browse/WICKET-3078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-M2.1
>         Environment: Widnows, Jetty 7
>            Reporter: Ivan Vasilev
>            Assignee: Martin Grigorov
>             Fix For: 1.5-M3
>
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
>     fileUploadForm.setMultiPart(true);
>     fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods are called:
>     fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> 		try
> 		{
> 			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
> 		}
> 		catch (FileUploadException e)
> 		{
> 			throw new WicketRuntimeException(e);
> 		}
> When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 
> I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.

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


[jira] Commented: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914837#action_12914837 ] 

Hudson commented on WICKET-3078:
--------------------------------

Integrated in Apache Wicket 1.5.x #361 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/361/])
    WICKET-3078 FileUploadException is masked behind WicketRuntimeException and not handled by a Form

Clean the handling of FileUploadException when creating MultipartServletWebRequest. Do not wrap it in WicketRuntimeException and then check the cause


> FileUploadException is masked behind WicketRuntimeException and not handled by a Form
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3078
>                 URL: https://issues.apache.org/jira/browse/WICKET-3078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-M2.1
>         Environment: Widnows, Jetty 7
>            Reporter: Ivan Vasilev
>            Assignee: Martin Grigorov
>             Fix For: 1.5-M3
>
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
>     fileUploadForm.setMultiPart(true);
>     fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods are called:
>     fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> 		try
> 		{
> 			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
> 		}
> 		catch (FileUploadException e)
> 		{
> 			throw new WicketRuntimeException(e);
> 		}
> When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 
> I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.

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


[jira] Updated: (WICKET-3078) FileUploadException is masked behind WicketRuntimeException and not handled by a Form

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

Ivan Vasilev updated WICKET-3078:
---------------------------------

    Affects Version/s: 1.5-M2.1

> FileUploadException is masked behind WicketRuntimeException and not handled by a Form
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3078
>                 URL: https://issues.apache.org/jira/browse/WICKET-3078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-M2.1
>         Environment: Widnows, Jetty 7
>            Reporter: Ivan Vasilev
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
>     fileUploadForm.setMultiPart(true);
>     fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods are called:
>     fileUploadForm -> handleMultiPart -> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> 		try
> 		{
> 			return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize);
> 		}
> 		catch (FileUploadException e)
> 		{
> 			throw new WicketRuntimeException(e);
> 		}
> When the file size exceeds the maximum allowed a FileUploadException is thrown, however it is immediately caught and "masked" in a WicketRuntimeException. Inside the handleMultiPart method of the Form there is a catch block for FileUploadException, but the original exception is no longer of type FileUploadException and in this case the form fails to handle it. The result is that instead of an error message informing the user of exceeded limit a wicket stack trace page is displayed. 
> I'm not sure if this is part of wicket or wicket-extensions, because it involves classes from the both modules.

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