Incoherent error message when an exception handler method throws an unhandled 
exception
---------------------------------------------------------------------------------------

         Key: BEEHIVE-903
         URL: http://issues.apache.org/jira/browse/BEEHIVE-903
     Project: Beehive
        Type: Bug
  Components: NetUI  
    Versions: v1m1    
 Reporter: Rich Feit
 Assigned to: Rich Feit 
     Fix For: V1


This bug was distilled from a conversation with Xibin Zeng about 
http://issues.apache.org/jira/browse/BEEHIVE-899 .

Repro:
    - Create the following page flow controller:

----
@Jpf.Controller(
    catches={
        @Jpf.Catch(type=Exception.class, method="handleIt")
    }
)
public class Controller extends PageFlowController
{
    @Jpf.Action
    public Forward begin()
    {
        throw new IllegalStateException("intentional");
    }

    @Jpf.ExceptionHandler
    public Forward handleIt(Exception ex, String actionName, String message, 
Object formBean)
    {
        throw new UnsupportedOperationException("another intentional 
exception");
    }
}
----

    - Hit it in the browser.

EXPECTED: go to the normal unhandled-exception page, with a stack trace for the 
IllegalStateException (the original exception), and also see the stacktrace for 
the UnsupportedOperationException in the logs.

ACTUAL:
java.lang.ClassNotFoundException: handleIt
        
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:1026)
        
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
        
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:105)
        
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2048)
        
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
        
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2119)
        
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
        
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:600)
        
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:886)
        
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:613)
        
org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:163)
        org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

-- 
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

Reply via email to