You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2012/12/05 11:20:58 UTC

[jira] [Updated] (WW-3341) Dispatcher catches Exceptions silently since 2.1.1

     [ https://issues.apache.org/jira/browse/WW-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3341:
------------------------------

    Fix Version/s:     (was: 2.3.8)
                   2.3.7
    
> Dispatcher catches Exceptions silently since 2.1.1
> --------------------------------------------------
>
>                 Key: WW-3341
>                 URL: https://issues.apache.org/jira/browse/WW-3341
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.8
>            Reporter: Nicolas Berthet
>            Priority: Critical
>             Fix For: 2.3.7
>
>
> Trying to migrate from 2.0.x to 2.1.8.1, I noticed that the exception handling from the Dispatcher changed.
> Before :
> The dispatcher threw a ServletException and it was propagated through the stack
> Since 2.1.1 :
> The dispatcher catch all Exceptions and call sendError
> The problem is that the exception will not go up through the stack as it was the case before, so nobody in the stack (j2ee filters) will notice this exception (unless checking requests attributes, which is not a good way).
> If you use a javax.servlet.Filter for things such as open-session-in-view, you will not notice the exception, and maybe fail to rollback your current transaction, same for exception tracing filters, etc...
> It is a severe non-backward-compatible change, it was not mentionned in any of the changelogs. It seems it has introduced by revision 602665, seems to be related to the fix for WW-218.
> From Dispatcher.serviceAction javadoc...
> "All other errors are reported by throwing a ServletException."
> The exception handling has to be clarified, I think propagating a ServletException is more correct as it relies on the container and allow filters to take it into account. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira