Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5434

HttpSession invalidate() throws IllegalStateException: Transaction is not in a valid state

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 10.0.0.CR5
    • 10.0.0.CR2
    • Clustering
    • None
    • Hide

      Reproduced in a project here:

      • https://github.com/mbw-ahc/wf10issue
      • servlet-security copied from the quick starts but with <distributable/> added to the configuration
      • logoutwar has a simple servlet that executes the session invalidate on get
      • standalone-ha-sso.xml is the configuration file used, it is just standalone-ha with sso configured, plus some security domain added from the quick start.

      Steps

      Show
      Reproduced in a project here: https://github.com/mbw-ahc/wf10issue servlet-security copied from the quick starts but with <distributable/> added to the configuration logoutwar has a simple servlet that executes the session invalidate on get standalone-ha-sso.xml is the configuration file used, it is just standalone-ha with sso configured, plus some security domain added from the quick start. Steps run wildfly 10.0.0.CR2 with the standalone-ha-sso.xml configuration setup the quickstart as per the instructions on the quickstart https://github.com/wildfly/quickstart/tree/10.x/servlet-security deploy the wars open a browser, To login from one war, open the URL to http://localhost:8080/wildfly-servlet-security/SecuredServlet To invalidate the session from the other war, open http://localhost:8080/logoutwar/logout The stack trace should be visible in the console log.

    Description

      Running standalone HA configuration with single sign on enabled in undertow configuration
      Two wars deployed each marked as distributable

      If you login thought one war, then execute sesssion.invalidate() on the other you get the following exception during the invalidate call:

      08:55:46,441 ERROR [io.undertow.request] (default task-35) UT005023: Exception handling request to /logoutwar/logout: java.lang.IllegalStateException: Transaction DummyTransaction {xid=DummyXid{id=96}, status=3} is not in a valid state to be invoking cache operations on.
              at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:388)
              at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:357)
              at org.infinispan.interceptors.TxInterceptor.visitRemoveCommand(TxInterceptor.java:230)
      ...
              at org.wildfly.clustering.web.infinispan.session.coarse.CoarseSessionFactory.remove(CoarseSessionFactory.java:66)
              at org.wildfly.clustering.web.infinispan.session.InfinispanSession.invalidate(InfinispanSession.java:68)
              at org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager$SchedulableSession.invalidate(InfinispanSessionManager.java:438)
              at org.wildfly.clustering.web.undertow.session.DistributableSession.invalidate(DistributableSession.java:176)
              at io.undertow.servlet.spec.HttpSessionImpl.invalidate(HttpSessionImpl.java:199)
              at wf10issue.logoutwar.LogoutServlet.doGet(LogoutServlet.java:27)
      

      (full stack trace attached)

      Attachments

        Activity

          People

            pferraro@redhat.com Paul Ferraro
            mbwahc Mark Wardell (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: