Description
I first mentioned this issue in the dev list on April 4. For additional details, see...
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)
...