struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <>
Subject [jira] [Commented] (WW-3341) Dispatcher catches Exceptions silently since 2.1.1
Date Sun, 28 Oct 2012 21:43:12 GMT


Lukasz Lenart commented on WW-3341:

Could you check the latest build ? You can disable handleException by specifying struts.handle.exception
= false and the ServletException will be thrown.
> Dispatcher catches Exceptions silently since 2.1.1
> --------------------------------------------------
>                 Key: WW-3341
>                 URL:
>             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, 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:

View raw message