Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.20
-
None
Description
Struts 2.3.20 appears to have caused a regression that prevents exceptions thrown from convention-plugin actions from reaching ExceptionMappingInterceptor. This breaks exception handling when using the convention-plugin.
To Reproduce:
- Generate a project struts2-archetype-convention archetype using 2.3.20
- Throw exception in the action. With 2.3.20, a blank page is shown.
- Change to 2.3.16.3 and you will get the standard struts2 error page.
The breaking change appears to have been made in WW-4331. This causes error interceptor code to break (showing a blank page when exceptions are thrown) as DefaultActionInvocation does not catch an exception from the default UnknownHandler implementation execution, which would previously re-throw the original exception back up for the interceptors to catch.
Workaround:
We've created our own UnknownHandler implementation that just throws a new NoSuchMethodException, allowing DefaultActionInvocation to re-throw the original exception so that our error interceptor can again catch it.
Attachments
Issue Links
- is duplicated by
-
WW-4444 DefaultActionInvocation.invokeAction(Object,ActionConfig) catch too many exceptions
- Closed
-
WW-4455 throwing a RuntimeException in an action may not be properly managed in struts
- Closed
-
WW-4477 As 2.3.20 Stacktraces are gone??
- Closed
- is related to
-
WW-4331 ConventionUnknownHandler throws null
- Closed
- relates to
-
WW-4480 DefaultActionInvocation.invokeAction calls unknownHandlerManager.handleUnknownMethod for any OgnlException
- Closed