[jboss-jira] [JBoss JIRA] (WFCORE-1287) session.invalidate() throw NullPointerException on invalidated session with replication-granularity set to ATTRIBUTE

Sammy Chu (JIRA) issues at jboss.org
Sun Jan 10 23:18:00 EST 2016


Sammy Chu created WFCORE-1287:
---------------------------------

             Summary: session.invalidate() throw NullPointerException on invalidated session with replication-granularity set to ATTRIBUTE
                 Key: WFCORE-1287
                 URL: https://issues.jboss.org/browse/WFCORE-1287
             Project: WildFly Core
          Issue Type: Bug
         Environment: Wildfly 8.2.1-Final
JDK 1.8.0_66-b17
Windows & Linux
            Reporter: Sammy Chu
         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)


More information about the jboss-jira mailing list