[
https://jira.jboss.org/browse/WELD-587?page=com.atlassian.jira.plugin.sys...
]
Wang Liyu commented on WELD-587:
--------------------------------
I have checked out the latest version and tested it still has the same issue. when
redirect with LRC, Weld add "?cid={id}" to the URL and when session invalid, and
when Restore the conversation after redirect, weld try to restore conversation with the ID
from URL, and since the Session is already recreated (either because session.invalidate()
or session timeout), that CID doesn't exist and this cause the problem.
Exception happened when invalid session before ending Conversation
with Post-Redirect-Get
-----------------------------------------------------------------------------------------
Key: WELD-587
URL:
https://jira.jboss.org/browse/WELD-587
Project: Weld
Issue Type: Bug
Components: Conversations, Scopes & Contexts
Affects Versions: 1.0.1.Final
Environment: Weld-servlet 1.0.1.Final, GlassFish3.0.1 or Tomcat6.0.26
Reporter: Wang Liyu
Fix For: 1.1.0.BETA2
See
http://seamframework.org/Community/ExceptionWhenEndingConversationWithPos...
for the test case.
basically, when you call HttpSession.invalidate() method with a LRC running, after
redirect, it will report an exception:
INFO: Instantiated an instance of
org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: HelloWorld was constructed
INFO: begin the LRC here.
INFO: about to invalid the session here.
WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet
Faces Servlet threw exception
org.jboss.weld.context.NonexistentConversationException: WELD-000301 Could not restore
long-running conversation 2 because id not known
at
org.jboss.weld.conversation.AbstractConversationManager.beginOrRestoreConversation(AbstractConversationManager.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
at
org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:113)
at
org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at
org.jboss.weld.conversation.ServletConversationManager_$$_javassist_3.beginOrRestoreConversation(ServletConversationManager_$$_javassist_3.java)
at
org.jboss.weld.jsf.WeldPhaseListener.initiateSessionAndConversation(WeldPhaseListener.java:171)
at
org.jboss.weld.jsf.WeldPhaseListener.beforeRestoreView(WeldPhaseListener.java:118)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:87)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira