[jboss-jira] [JBoss JIRA] (WFLY-7754) WELD o.j.w.e.IllegalStateException after saved session does not auto-recover

Darryl Miles (JIRA) issues at jboss.org
Tue Jan 17 05:51:00 EST 2017


    [ https://issues.jboss.org/browse/WFLY-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13349293#comment-13349293 ] 

Darryl Miles commented on WFLY-7754:
------------------------------------

ERROR [io.undertow.request] (default task-17) UT005023: Exception handling request to /main/systema/process.cgi: org.jboss.weld.exceptions.IllegalStateException: WELD-0002
Expected hash: 385344494
Current index: BeanIdentifierIndex [hash=-1454573931, indexed=23]
     0: WELD%AbstractBuiltInBean%/content/com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.abc-0.0.1-SNAPSHOT.jar%HttpSession
     1: WELD%AbstractBuiltInBean%com.sun.jsf-impl:main.additionalClasses%HttpSession
     2: WELD%AbstractBuiltInBean%org.hibernate.validator.cdi:main.additionalClasses%HttpSession
     3: WELD%AbstractBuiltInBean%org.jberet.jberet-core:main.additionalClasses%HttpSession
     4: WELD%AbstractBuiltInBean%org.jboss.as.jsf:main.additionalClasses%HttpSession
     5: WELD%AbstractBuiltInBean%org.jboss.jts:main.additionalClasses%HttpSession
     6: WELD%AbstractBuiltInBean%org.jboss.resteasy.resteasy-cdi:main.additionalClasses%HttpSession
     7: WELD%AbstractBuiltInBean%org.wildfly.extension.messaging-activemq:main.additionalClasses%HttpSession
     8: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear%HttpSession
     9: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.aspnetdb-0.0.1-SNAPSHOT.jar/%HttpSession
    10: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.common-0.0.1-SNAPSHOT.jar/%HttpSession
    11: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.experimental-0.0.1-SNAPSHOT.jar/%HttpSession
    12: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.incubation-0.0.1-SNAPSHOT.jar/%HttpSession
    13: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.kernel-0.0.1-SNAPSHOT.jar/%HttpSession
    14: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.kernel.main-0.0.1-SNAPSHOT.jar/%HttpSession
    15: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.main-0.0.1-SNAPSHOT.jar/%HttpSession
    16: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.systema-0.0.1-SNAPSHOT.jar/%HttpSession
    17: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.security-0.0.1-SNAPSHOT.jar/%HttpSession
    18: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.thirdparty-0.0.1-SNAPSHOT.jar/%HttpSession
    19: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-ejb.websupps-0.0.1-SNAPSHOT.jar/%HttpSession
    20: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-webapp.main-0.0.1-SNAPSHOT.war%HttpSession
    21: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-webapp.publicapi-0.0.1-SNAPSHOT.war%HttpSession
    22: WELD%AbstractBuiltInBean%com.mydomain.ear-0.0.1-SNAPSHOT.ear/com-mydomain-webapp.support-0.0.1-SNAPSHOT.war%HttpSession

        at org.jboss.weld.context.http.HttpSessionContextImpl.checkBeanIdentifierIndexConsistency(HttpSessionContextImpl.java:101)
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:47)
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:23)
        at org.jboss.weld.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:237)
        at org.jboss.weld.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:152)
        at io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:246)
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:291)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


> WELD o.j.w.e.IllegalStateException after saved session does not auto-recover
> ----------------------------------------------------------------------------
>
>                 Key: WFLY-7754
>                 URL: https://issues.jboss.org/browse/WFLY-7754
>             Project: WildFly
>          Issue Type: Bug
>          Components: CDI / Weld, Web (Undertow)
>    Affects Versions: 10.0.0.Final
>            Reporter: Darryl Miles
>            Assignee: Stuart Douglas
>
> When modifying the WELD bean profile between starting/stopping WildFly with persistent session cookies over restart enabled.
> It is possible to get an unrecoverable o.j.w.e.IllegalStateException.
> What I mean by this is that if the AS knows the HTTP session cookie is a valid ID, but is unable to recover it from the persistence serialization over a restart (due to a change in the WELD BeanIdentifer instances changing to allow the optimization to work in this area).  What the AS should do is simply log the problem and invalidate the session cookie completely.  All this should happen in a transparent way to the WebApp, so it gets a null return or a brand new HttpSession.
> This will automatically allow the HTTP client to recover, by forcing the application to generate a new HTTP session as necessary / or force logout, etc..
> This is unrecoverable since the exception seems to be thrown at a level before it hits any WebApp application code.  So it doesn't seem possible for the WebApp developer to correct the problem from the exception.  Which makes sense since you need a HttpSession object to invoke #invalidate() on and it is recovering that that is.
> Everytime the user refreshes all they get is the error and a HTTP/500 Internal Server Error and the user has to either delete their cookie, or the WildFly admin shutdown and remove any persistent session cookie data.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list