[
https://issues.jboss.org/browse/WFLY-1533?page=com.atlassian.jira.plugin....
]
Stuart Douglas commented on WFLY-1533:
--------------------------------------
It looks like this is caused by a combination of atmosphere long running requests and
weld. Atmosphere starts a long running request, and weld stashes the attached session in a
thread local. While this request is ongoing another requests ends the session. Once the
atmosphere request ends weld attempts to use the session it stashed in a thread local,
which has since been invalidated.
A simple fix would be to call getLastAccesedTime on the session to ensure it is still
valid. A better approach would be to just store the request, and not the session, and call
getSession(false) each time. This would reduce the number of thread locals that weld needs
to set. Ideally weld would only set a single thread local in the listener, which is the
current request, and all other thread local data would be derived from that.
UT015005: Error invoking method requestDestroyed on listener class
-------------------------------------------------------------------
Key: WFLY-1533
URL:
https://issues.jboss.org/browse/WFLY-1533
Project: WildFly
Issue Type: Bug
Components: CDI / Weld
Affects Versions: 8.0.0.Alpha2, 8.0.0.Alpha4
Reporter: Juergen Zimmermann
Assignee: Jozef Hartinger
Attachments: mojarra-2.1.zip, testcase-WFLY-1533.zip
I'm using a WildFly snapshot with Undertow 1.0.0.Alpha19 and Weld 2.0.1.Final.
I'm getting the following stacktrace:
16:55:04,534 ERROR [io.undertow.servlet.request] UT015005: Error invoking method
requestDestroyed on listener class org.jboss.weld.servlet.WeldListener:
java.lang.IllegalStateException: UT000010: Session not found MDEkG_Aum5OlXUsjh11kGkh9
at
io.undertow.server.session.InMemorySessionManager$SessionImpl.getAttribute(InMemorySessionManager.java:221)
[undertow-core-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:106)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at
org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:25)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at
org.jboss.weld.context.http.HttpConversationContextImpl.getSessionAttribute(HttpConversationContextImpl.java:13)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at
org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:161)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at
org.jboss.weld.servlet.ConversationContextActivator.disassociateConversationContext(ConversationContextActivator.java:162)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at
org.jboss.weld.servlet.HttpContextLifecycle.requestDestroyed(HttpContextLifecycle.java:159)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:91)
[weld-core-impl-2.0.1.Final.jar:2013-06-03 10:29]
at
io.undertow.servlet.core.ApplicationListeners.requestDestroyed(ApplicationListeners.java:196)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:159)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:114)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:47)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:90)
[undertow-servlet-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36)
[undertow-core-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:607)
[undertow-core-1.0.0.Alpha19.jar:1.0.0.Alpha19]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
--
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