[
https://issues.jboss.org/browse/WFLY-6315?page=com.atlassian.jira.plugin....
]
Sammy Chu commented on WFLY-6315:
---------------------------------
Hi [~rhusar] & [~pferraro],
Just tested on Wildfly 10.0.0.Final and the Github master branch (Wildfly
10.1.0.Final-SNAPSHOT) with HA profile (2 nodes in the same machine), the result as
below:
# session-invalidate-noreplication.war throwing IllegalStateException with message
"UT000021: Session already invalidated: java.lang.IllegalStateException: UT000021:
Session already invalidate"
# session-invalidate-replication-session.war, session-invalidate-replication-attribute.war
throwing IllegalStateException with message "Transaction
DummyTransaction{xid=DummyXid{id=8}, status=3} is not in a valid state to be invoking
cache operations on.: java.lang.IllegalStateException: Transaction
DummyTransaction{xid=DummyXid{id=8}, status=3} is not in a valid state to be invoking
cache operations on."
I think there should still have some issue:
# The exception message in session replication cause is not meaningful.
# Actually I caught the exception in the test code, but the server log still printing such
exception
For the above reason, I would like to reopen this issue.
session.invalidate() throw NullPointerException on invalidated
session with replication-granularity set to ATTRIBUTE
--------------------------------------------------------------------------------------------------------------------
Key: WFLY-6315
URL:
https://issues.jboss.org/browse/WFLY-6315
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 8.2.1.Final
Environment: Wildfly 8.2.1-Final
JDK 1.8.0_66-b17
Windows & Linux
Reporter: Sammy Chu
Assignee: Paul Ferraro
Fix For: 9.0.0.Beta1
Attachments: session-invalidate-noreplication.war,
session-invalidate-replication-attribute.war, session-invalidate-replication-session.war
We suspected that calling session.invalidate() on an already invalidated session with
replication-granularity set to "ATTRIBUTE" will throw a NullPointerException,
but from the specification it should throw an IllegalStateException instead.
Stack trace as below:
{noformat}
13:12:35,554 ERROR [io.undertow.request] (default task-32) UT005023: Exception handling
request to /<our system url>: java.lang.NullPointerException
at
org.wildfly.clustering.web.infinispan.session.fine.FineSessionFactory$1.invoke(FineSessionFactory.java:103)
at
org.wildfly.clustering.web.infinispan.session.fine.FineSessionFactory$1.invoke(FineSessionFactory.java:100)
at
org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)
at
org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:87)
at
org.wildfly.clustering.web.infinispan.session.fine.FineSessionFactory.remove(FineSessionFactory.java:109)
at
org.wildfly.clustering.web.infinispan.session.fine.FineSessionFactory.remove(FineSessionFactory.java:53)
at
org.wildfly.clustering.web.infinispan.session.InfinispanSession.invalidate(InfinispanSession.java:74)
at
org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager$SchedulableSession.invalidate(InfinispanSessionManager.java:359)
at
org.wildfly.clustering.web.undertow.session.DistributableSession.invalidate(DistributableSession.java:140)
at io.undertow.servlet.spec.HttpSessionImpl.invalidate(HttpSessionImpl.java:199)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
... // our application code, just calling "session.invalidate()"
{noformat}
We also enclosed the simplified samples to reproduce this issue
(session-invalidate-noreplication.war, session-invalidate-replication-attribute.war,
session-invalidate-replication-session.war). In general they are the same except the
replication-granularity (in jboss-web.xml => replication-granularity) settings.
# session-invalidate-noreplication.war and session-invalidate-replication-session.war
works correctly as they are throwing IllegalStateException.
# session-invalidate-replication-attribute.war is buggy because it throw
NullPointerException instead.
For more information, please refer to
https://developer.jboss.org/message/947295
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)