NetUI FlowController execute() should handle exception from begin/end context
on page flow ControlContainerContext
------------------------------------------------------------------------------------------------------------------
Key: BEEHIVE-1097
URL: http://issues.apache.org/jira/browse/BEEHIVE-1097
Project: Beehive
Type: Bug
Components: NetUI
Versions: V1, 1.0.1
Reporter: Carlin Rogers
Assigned to: Carlin Rogers
Fix For: v.next
I first mentioned this issue in the dev list on April 4. For additional
details, see...
http://mail-archives.apache.org/mod_mbox/beehive-dev/200604.mbox/[EMAIL
PROTECTED]
The NetUI FlowController execute() method does not correctly handle exceptions
thrown from the control container management begin and end context routines.
For example, an exception thrown from an onRelease resource event during an end
context will bubble up and be caught in the processActionPerform() method of
the Struts framework, then passed to the RequestProcessor method
processException(). If there's no matching exception config, processException()
will throw a new ServletException with the "root cause" exception.
Unfortunately, when there is a user defined exception handler associated to the
exception, processException() does not properly handle an exception config for
the NetUI page flow exception handler. In this case, a ClassNotFoundException
occurs in the Struts code when it tries to create an ExceptionHandler from the
exception config. Struts expects the handler attribute of the exception element
in the struts config to be a fully qualified Java class name. In NetUI we
generate just the method name of the page flow Controller exception handler.
This causes the CNFE.
Here's a sample stack trace of a status 500 error returned from the server...
exception
javax.servlet.ServletException: exceptionHandler
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:534)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processException(PageFlowRequestProcessor.java:978)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:98)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2030)
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2101)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:553)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:843)
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:634)
org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
...
root cause
java.lang.ClassNotFoundException: exceptionHandler
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:529)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processException(PageFlowRequestProcessor.java:978)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:98)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2030)
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2101)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira