Emond Papegaaij commented on Bug WELD-1607

We are hitting this issue as well with 2.1.2 on tomcat 7.0.42. Upgrading to 2.2 is not (yet) an option, so I've backported your commit to 2.1.2, but to no avail. We still get the same error.

Investigation of the logs shows that trouble starts when these warnings are logged:

[2014-04-24 07:02:14,691] [WARN] [ajp-bio-8009-exec-684] Servlet | WELD-000712: Unable to dissociate context org.jboss.weld.context.http.LazyHttpConversationContextImpl@49c739a7 when destroying request org.apache.catalina.connector.Request@78cec885

This effectively makes thread ajp-bio-8009-exec-684 unable to serve any other requests. All subsequent requests handled by this thread can no longer access the conversation, triggering the following exception:

[2014-04-24 07:02:24,903] [ERROR] [ajp-bio-8009-exec-684] ExceptionHandlingRequestCycleListener | Exception in page [Page class = nl.topicus.eduarte.web.pages.mobile.MobileLoginPage, id = 0, render count = 1] on url wicket/bookmarkable/nl.topicus.eduarte.web.pages.mobilejava.lang.IllegalStateException: WELD-000341: Unable to load current conversations from the associated request, something went badly wrong when associate() was called
        at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:434)
        at org.jboss.weld.bean.builtin.ConversationBean.newInstance(ConversationBean.java:31)
        at org.jboss.weld.bean.builtin.ConversationBean.newInstance(ConversationBean.java:16)
        at org.jboss.weld.bean.builtin.AbstractDecorableBuiltInBean.create(AbstractDecorableBuiltInBean.java:52)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98)
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
        at org.jboss.weld.proxies.Conversation$1234622151$Proxy$_$$_WeldClientProxy.getId(Unknown Source)
        at org.apache.wicket.cdi.ConversationPropagator.onRequestHandlerResolved(ConversationPropagator.java:107)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150)
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:260)
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at nl.topicus.cobra.hibernate.CloseTransactionAfterViewFilter.doFilterInternal(CloseTransactionAfterViewFilter.java:66)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

We are using wicket-cdi-1.1 integration, but I do not believe it is causing these errors. It's simply triggering the exception by accessing the conversation. We are investigating if disabling the lazy conversation context helps. I'll report back with the results.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira