Your exception mapping is likely throwing an exception then... think of it like this -
1 Action gets invoked 2 Oh-No! an exception -> go to the exception page 3 Exception page invoked 4 Oh-No! an exception -> go to #2 Xwork's chain result explicitly checks that an infinite chain sequence isn't happening. That's more or less the only thing the chain result checks, so I would make sure this isn't the case. -Wes On Fri, Sep 11, 2009 at 1:23 PM, Denny Erinjery <denny.erinj...@timelink.com> wrote: > Anybody have any ides about this?? > I try to do an additional action class with redirectAction after the > first chaining using a second action to avoid the 500 error but that > didn't help me, debugging into the ActionChain interceptor from xworks > shows that it went to an infinte error after checking the > chaininghistory > Thanks > > > -----Original Message----- > From: Denny Erinjery [mailto:denny.erinj...@timelink.com] > Sent: Thursday, September 10, 2009 3:04 PM > To: Struts Users Mailing List > Subject: excpetion chaining to custom exception handler issue > > HI, > I'm using a global exception handler action class to get the exception > details and display it on a custom error page. > Following is the struts xml configuration > <global-results> > <result name="Excpetion" type="chain"> > <param > name="actionName">UnhandledExceptionHandler</param> > <!-- param > name="namespace">/namespaceWhereActionIsDefined</param --> > </result> > </global-results> > > <global-exception-mappings> > <exception-mapping exception=3D"java.lang.Exception" > result="Excpetion"/> > </global-exception-mappings> > > > <action name="UnhandledExceptionHandler" > class="com.timelink.falco.wui.struts.handlers.GlobalException"> > <result name=3D"error" > type="dispatcher">/jsp/systemerror.jsp</result> > > </action> > > Once my action class is invoked it will create my exception object using > the current exception set by the struts setter as well as I get more > details about the system at the time of the exception. In order to get > the exception forwarded to my action class from the action where the > exception occurs I use chaining in the result mapping > "<global-results> > <result name="Excpetion" type="chain"> .... " > This works and everything is populated on my error jsp page and the page > gets displayed as expected. Now if I refresh this error page, although > the actions go through the last exception path as expected, and my error > handler class is executed, it will not display the error page again this > time but will end up showing the following error= > > HTTP Status 500 - Infinite recursion detected: [//loginAction!login, > //UnhandledExceptionHandler, //UnhandledExceptionHandler, > //UnhandledExceptionHandler] - [unknown location] > com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java > :203) > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct > ionInvocation.java:361) > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo > cation.java:265) > org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java > :52) > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:4 > 68) > org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher > .java:395) > > After this error if I refresh the above page(HTTP Status 500) , it will > once again show my error page and a refresh on that page will bring back > the error 500 again!!! This keeps on doing on consecutive refresh. This > will go away if I use "redierctAction" in place of "chain" but then I > will lost the information about the exception once it reached in my > exception handling action class Please tell me is this a problem on my > error handling or a sturts issue. > > Thanks > Denny > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org