beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <...@beehive.apache.org>
Subject [jira] Resolved: (BEEHIVE-1097) NetUI FlowController execute() should handle exception from begin/end context on page flow ControlContainerContext
Date Tue, 11 Apr 2006 17:59:31 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-1097?page=all ]
     
Carlin Rogers resolved BEEHIVE-1097:
------------------------------------

    Resolution: Fixed
     Assign To: Julie Zhuo  (was: Carlin Rogers)

This is fixed with revision 393271. See...
http://svn.apache.org/viewcvs?rev=393271&view=rev

The NetUI FlowController execute() now handles exceptions from begin/end context on page flow
ControlContainerContext. If we're not already handling an exception from executing the action,
then we pass the exception to the handleException() method. Otherwise we will just log the
exception from endContext.

There is a new test to check that we can handle the exception. The same test can be used to
repro the issue when the fix is not integrated. You will see the 500 status page with the
stack trace provided in the bug with the CNFE in processException(). Once the fix is in place
the exception handling will forward to an error.jsp with an included message.

> 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
>     Assignee: Julie Zhuo
>      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/%3cba6911de0604041208v58a5586emebadc2f4a0818a1a@mail.gmail.com%3e
> 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


Mime
View raw message