-
1. Re: Redirecting concurrent call errors
sanjaybhatt73 Sep 16, 2009 2:07 PM (in response to petercr4)Peter, did u find solution for this?
I am also facing the same problem.
-
2. Re: Redirecting concurrent call errors
vaughnb.vaughn.butt.datacom.co.nz Oct 1, 2009 7:10 AM (in response to petercr4)I think this is a bug in Seam. Either in the documentation that says you can do end-conversation and redirect when you can't or with Seam because you should be able to end-conversation and redirect or possibly there is some condition that is undocumented.
I was able to duplicate Peter's results (expected behaviour with http-error and unexpected exceptions with end-conversation and redirection) with a seam-gen project that had a seam-generated action.
My system is java 1.6.0_16-b01, JBoss 5.1.0GA.
With debug turned off (in components.xml I got the error message 'Something bad happened :-( Unexpected error, please try again' which implies the final exception handler was invoked.
Note that _none_ of the examples included in the Seam distribution have end-conversation and redirect on ConcurrentRequestTimeoutException
I'm not sure what files to include so I haven't included any. I can include any that are required.
Partial log:
17:27:09,077 WARN [SeamPhaseListener] uncaught exception, passing to exception handler
org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:641)
at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
...
at java.lang.Thread.run(Thread.java:619)
17:27:09,309 ERROR [SeamPhaseListener] swallowing exception
org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:641)
at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:230)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
...
at java.lang.Thread.run(Thread.java:619)
17:27:09,550 WARN [Component] Cannot create Seam component, scope is not active: org.jboss.seam.international.statusMessages(CONVERSATION)
17:27:09,570 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: VaughnFoo.statusMessages
17:27:09,576 SEVERE [application] javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: VaughnFoo.statusMessages
javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: VaughnFoo.statusMessages
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) -
3. Re: Redirecting concurrent call errors
petercr4 Oct 2, 2009 8:40 AM (in response to petercr4)With recent Richfaces libraries I avoid this problem by using a4j:queue component on the pages where this is necesarry (when I have onkeyup event for example).
From richfaces documentation:
"The <a4j:queue/> (defined as global for the form where controls are placed) handles all requests and fires the next one only after the response from the previous returned. "This breaks the asynchronous part of AJAX but is good enough for my type of applications.
-
4. Re: Redirecting concurrent call errors
vaughnb.vaughn.butt.datacom.co.nz Oct 4, 2009 10:33 PM (in response to petercr4)I agree with Peter that the problem can be mitigated by using a queue on the client side but, as you say, it serialises all of the server requests removing the
asynchronicity
of AJAX. OTOH, if I understand the way Seam works, then serialising on the client side won't make a difference anyway because Seam serialises all server requests that are part of a conversation.Peter, I take it you never actually got redirect on ConcurrentRequestTimeoutException working.
-
5. Re: Redirecting concurrent call errors
petercr4 Oct 5, 2009 8:16 AM (in response to petercr4)No, I never got it working with that exception. As I can see from your post that bug is still there.