You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Glauber Adriano Reis (JIRA)" <de...@beehive.apache.org> on 2005/08/30 23:35:05 UTC

[jira] Commented: (BEEHIVE-898) Bogus Forward from a PageFlow Action method results in a java.lang.ClassNotFoundException

    [ http://issues.apache.org/jira/browse/BEEHIVE-898?page=comments#action_12320627 ] 

Glauber Adriano Reis commented on BEEHIVE-898:
----------------------------------------------

since handlePageFlowException inside SharedFlow.java returns null, DefaultExceptionHandler thinks it should call invokeExceptionHandlerClass, but since (in this case) exceptionConfig.getHandler() returns a handler method instead of a class name, a java.lang.ClassNotFoundException will be thrown.

The following patch would fix it

(BTW, is there any situation where isHandlerMethod in PageFlowExceptionConfig would evaluate to false?)

Index: src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java
===================================================================
--- src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java       (revision 264827)
+++ src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java       (working copy)
@@ -190,8 +190,7 @@
                     ret = invokeExceptionHandlerMethod( context, ex, pfExceptionConfig, form, actionMapping );
                 }
             }
-
-            if ( ret == null )
+            else
             {
                 ret = invokeExceptionHandlerClass( context, ex, exceptionConfig, actionMapping, form );
             }




> Bogus Forward from a PageFlow Action method results in a java.lang.ClassNotFoundException
> -----------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-898
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-898
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: v1m1
>  Environment: ALL
>     Reporter: Xibin Zeng

>
> Repro steps:
> 1. Create a shared flow in your app that handles PageFlowException, for example:
> @Jpf.Controller(
>     catches={
>        @Jpf.Catch(type=PageFlowException.class, method="handlePageFlowException")
>     }
> )
> public class SharedFlow extends SharedFlowController
> {
> ...
> }
> 2. In your Controller class, create the shared flow reference to the shared flow created in step 1.
> 3. In the same Controller class in step 2, create an action  method that returns an unresolveable Forward.
> After compiling and deploying the app, now hit the action create in step 3. Rather than getting a PageFlow error that indicates it could not resolve the Forward, it chokes on a java.lang.ClassNotFoundException for handlePageFlowException.
> A quick debugging point to ExceptionConfig ...
>  at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
> at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
> at org.apache.beehive.netui.pageflow.internal.DefaultExceptionsHandler.invokeExceptionHandlerClass(DefaultExceptionsHandler.java:339)
> at org.apache.beehive.netui.pageflow.internal.DefaultExceptionsHandler.handleException(DefaultExceptionsHandler.java:196)
> at org.apache.beehive.netui.pageflow.FlowController.handleException(FlowController.java:259)
> at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:444)
> at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:285)
> at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:307)
> at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:48)
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
> at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:105)
> at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2048)
> at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
> at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2119)
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
> at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:600)
> at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:886)
> at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:613)
> at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:163)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) 

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