You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by srinivasch <sr...@gmail.com> on 2008/01/03 19:59:19 UTC

Re: [S2] Infinite Recursion Detected error

Hi,

  I am getting the same error when running the junit test.
Infinite recursion detected: [/login!input, /exceptionHandler,
/exceptionHandler] - [unknown location]
	at
com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)
	at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
	at
com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:229)
	at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
	at
gov.glin.web.struts.action.LoginActionTest.testValidLogin(LoginActionTest.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


appreciate if you could let me know how you resolved this issue.



Harring Figueiredo wrote:
> 
> Folks,
> 
> I am getting the following error:
> 
> Infinite recursion detected: [//connect!execute, //conf, //conf] -
> [unknown location]
> 
> com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)
> 
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:343)
> 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
> 
> 
> The action set up is as follow:
> 
> 
>      <action name="connect" class="sf.ConnectAction" >
> 
>             <result name="success" type="chain">conf</result>
>              <interceptor-ref name="guest"/>
>         </action>
> 
>      <action name="conf" class="sf.ConfigAction" >
>             <result name="status" type="chain">get_status</result>
>             <result name="role" type="chain">get_role</result>
>             <interceptor-ref name="guest"/>
>         </action>
> 
> 
>      <action name="get_status" class="sf.StatusAction" >
>             <result name="success" >Home.jsp</result>
>         </action>
> 
>      <action name="get_status" class="sf.RoleAction" >
>             <result name="success" >Home.jsp</result>
>             <interceptor-ref name="guest"/>
>         </action>
> 
> Any help appreciated.
> 
> Hf
> --
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Infinite-Recursion-Detected-error-tp9715528p14603025.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Infinite Recursion Detected error

Posted by srinivasch <sr...@gmail.com>.

 I could resolve that issue now, the problem was there was an NPE which was
thrown in ContextInterceptor because I didnt set the Session in the
BaseTestCase

  proxy.getInvocation().getInvocationContext().setSession(sessionMap);

and hence the infinite recursion. Good Lord I spent lot of time debugging
for this. My bad.

Thanks
Sri


srinivasch wrote:
> 
> Hi,
> 
>   I am getting the same error when running the junit test.
> Infinite recursion detected: [/login!input, /exceptionHandler,
> /exceptionHandler] - [unknown location]
> 	at
> com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)
> 	at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> 	at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> 	at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> 	at
> com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:229)
> 	at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> 	at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> 	at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> 	at
> gov.glin.web.struts.action.LoginActionTest.testValidLogin(LoginActionTest.java:21)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at
> org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> here is the entry in the struts.xml
> 
> <action name="login" class="loginAction">
> 			{ "input", "login" }
> 			<result name="input" type="freemarker">/login/login.ftl</result>
> 			<result name="success" type="redirect">/home.action</result>
> 			<result name="password-expired"
> type="redirect">/changePassword.action?user=${user.userId}</result>
> 			<interceptor-ref name="validatingStack" />
> 			<exception-mapping result="input"
> exception="........InvalidUserException"></exception-mapping>
> 			<exception-mapping result="input"
> exception=".........InvalidPasswordException"></exception-mapping>
> 			<exception-mapping result="input"
> exception=".........DisabledUserException"></exception-mapping>
> 			<exception-mapping result="input"
> exception="........TooManyLoginAttemptsException"></exception-mapping>
> 			<exception-mapping result="password-expired"
> exception=".......ExpiredPasswordException"></exception-mapping>
> 		</action>
> 
> appreciate if you could let me know how you resolved this issue. 
> 
> 
> 
> Harring Figueiredo wrote:
>> 
>> Folks,
>> 
>> I am getting the following error:
>> 
>> Infinite recursion detected: [//connect!execute, //conf, //conf] -
>> [unknown location]
>> 
>> com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)
>> 
>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:343)
>> 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>> 
>> 
>> The action set up is as follow:
>> 
>> 
>>      <action name="connect" class="sf.ConnectAction" >
>> 
>>             <result name="success" type="chain">conf</result>
>>              <interceptor-ref name="guest"/>
>>         </action>
>> 
>>      <action name="conf" class="sf.ConfigAction" >
>>             <result name="status" type="chain">get_status</result>
>>             <result name="role" type="chain">get_role</result>
>>             <interceptor-ref name="guest"/>
>>         </action>
>> 
>> 
>>      <action name="get_status" class="sf.StatusAction" >
>>             <result name="success" >Home.jsp</result>
>>         </action>
>> 
>>      <action name="get_status" class="sf.RoleAction" >
>>             <result name="success" >Home.jsp</result>
>>             <interceptor-ref name="guest"/>
>>         </action>
>> 
>> Any help appreciated.
>> 
>> Hf
>> --
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Infinite-Recursion-Detected-error-tp9715528p14697817.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org