[jboss-jira] [JBoss JIRA] (WFLY-5434) HttpSession invalidate() throws IllegalStateException: Transaction is not in a valid state
Mark Wardell (JIRA)
issues at jboss.org
Fri Oct 2 10:43:00 EDT 2015
[ https://issues.jboss.org/browse/WFLY-5434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114660#comment-13114660 ]
Mark Wardell commented on WFLY-5434:
------------------------------------
Also reproducible in the integration tests with some small adjustments
Adjust org.jboss.as.test.integration.web.sso.SSOTestBase.executeFormAuthSingleSignOnTest(URL, URL, Logger)
To remove the checkAccessAllowed checks in warB2 between the login and logout, as shown below
{code:java}
// Submit the login form
executeFormLogin(httpclient, warA1);
String ssoID = processSSOCookie(store, serverA.toString(), serverB.toString());
log.debug("Saw JSESSIONIDSSO=" + ssoID);
// Now try getting the war2 index using the JSESSIONIDSSO cookie
//log.debug("Prepare /war2/index.html get");
//checkAccessAllowed(httpclient, warB2 + "index.html");
// Access a secured servlet that calls a secured ejb in war2 to test
// propagation of the SSO identity to the ejb container.
//checkAccessAllowed(httpclient, warB2 + "EJBServlet");
// Now try logging out of war2
executeLogout(httpclient, warB2);
{code}
Run the integration test org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase.testFormAuthSingleSignOn(URL, URL)
{code}
Running org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 63.364 sec <<< FAILURE! - in org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase
testFormAuthSingleSignOn(org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase) Time elapsed: 0.671 sec <<< FAILURE!
java.lang.AssertionError: Logout: Didn't see code 302 (HTTP_MOVED_TEMP), but saw instead 500
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.jboss.as.test.integration.web.sso.SSOTestBase.executeLogout(SSOTestBase.java:172)
at org.jboss.as.test.integration.web.sso.SSOTestBase.executeFormAuthSingleSignOnTest(SSOTestBase.java:111)
at org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase.testFormAuthSingleSignOn(ClusteredSingleSignOnTestCase.java:125)
{code}
In the target\wildfly-SYNC-tcp-1\standalone\log\server.log file the same error is reported.
{code}
2015-10-02 10:34:26,752 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /war2/Logout: java.lang.IllegalStateException: Transaction DummyTransaction{xid=DummyXid{id=5}, 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 io.undertow.servlet.spec.HttpSessionImpl.invalidate(HttpSessionImpl.java:199)
at org.jboss.as.test.integration.web.sso.LogoutServlet.service(LogoutServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
{code}
> HttpSession invalidate() throws IllegalStateException: Transaction is not in a valid state
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-5434
> URL: https://issues.jboss.org/browse/WFLY-5434
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 10.0.0.CR2
> Reporter: Mark Wardell
> Assignee: Jason Greene
> Attachments: exception.txt
>
>
> 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:
> {code}
> 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)
> {code}
> (full stack trace attached)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list