2 Replies Latest reply on Jul 8, 2005 3:22 AM by siano

    NotSupportedException with ClusteredSingleSignOn

    siano

      Hi,

      I have enabled Web-Clustering with JBoss 4.0.2. To make failover possible, I have enabled the ClusteredSingleSignOn valve in tomcat's server.xml. Replication and failover work fine, however, if a Web session times out, I get the following two exceptions.

      2005-07-07 14:41:42,205 386341 DEBUG [org.jboss.web.tomcat.tc5.session.ClusteredSession] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) The session has expired with id: M3DVmgijZllrW3WcAhEebg** is it local? true
      2005-07-07 14:41:42,207 386343 ERROR [org.jboss.web.tomcat.tc5.sso.TreeCacheSSOClusterManager] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) caught exception removing session M3DVmgijZllrW3WcAhEebg** from SSO id 5CBD6CB721B5B15D03337ADE50830971
      javax.transaction.NotSupportedException: Transaction already active, cannot nest transactions.
       at org.jboss.tm.TxManager.begin(TxManager.java:169)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:110)
       at org.jboss.web.tomcat.tc5.sso.TreeCacheSSOClusterManager.removeSession(TreeCacheSSOClusterManager.java:509)
       at org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn.removeSession(ClusteredSingleSignOn.java:669)
       at org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn.sessionEvent(ClusteredSingleSignOn.java:303)
       at org.apache.catalina.session.StandardSession.fireSessionEvent(StandardSession.java:1547)
       at org.jboss.web.tomcat.tc5.session.ClusteredSession.expire(ClusteredSession.java:393)
       at org.jboss.web.tomcat.tc5.session.ClusteredSession.expire(ClusteredSession.java:327)
       at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:567)
       at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processExpires(JBossCacheManager.java:552)
       at org.jboss.web.tomcat.tc5.session.JBossManager.backgroundProcess(JBossManager.java:644)
       at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
       at java.lang.Thread.run(Thread.java:534)
      2005-07-07 14:41:42,211 386347 DEBUG [org.jboss.web.tomcat.tc5.session.JBossCacheManager] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) Removing session from local store with id: M3DVmgijZllrW3WcAhEebg**
      2005-07-07 14:41:42,211 386347 DEBUG [org.jboss.web.tomcat.tc5.session.JBossCacheService] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) Remove session from my own distributed store only. Fqn: /JSESSION/ui/M3DVmgijZllrW3WcAhEebg**
      2005-07-07 14:41:42,212 386348 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) java.lang.NullPointerException
      2005-07-07 14:41:42,213 386349 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossCacheManager.endTransaction(JBossCacheManager.java:503)
      2005-07-07 14:41:42,213 386349 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processExpires(JBossCacheManager.java:573)
      2005-07-07 14:41:42,213 386349 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossManager.backgroundProcess(JBossManager.java:644)
      2005-07-07 14:41:42,214 386350 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283)
      2005-07-07 14:41:42,214 386350 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
      2005-07-07 14:41:42,214 386350 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
      2005-07-07 14:41:42,214 386350 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
      2005-07-07 14:41:42,214 386350 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
      2005-07-07 14:41:42,215 386351 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at java.lang.Thread.run(Thread.java:534)
      2005-07-07 14:41:42,215 386351 ERROR [org.jboss.web.tomcat.tc5.session.JBossCacheManager] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) processExpires: failed with exception: org.jboss.util.NestedRuntimeException: TreeCacheAop.endTransaction(): ; - nested throwable: (java.lang.NullPointerException)2005-07-07 14:41:42,215 386351 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) org.jboss.util.NestedRuntimeException: TreeCacheAop.endTransaction(): ; - nested throwable: (java.lang.NullPointerException)
      2005-07-07 14:41:42,215 386351 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossCacheManager.endTransaction(JBossCacheManager.java:512)
      2005-07-07 14:41:42,215 386351 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processExpires(JBossCacheManager.java:573)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossManager.backgroundProcess(JBossManager.java:644)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
      2005-07-07 14:41:42,216 386352 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
      2005-07-07 14:41:42,217 386353 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at java.lang.Thread.run(Thread.java:534)
      2005-07-07 14:41:42,217 386353 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) Caused by: java.lang.NullPointerException
      2005-07-07 14:41:42,217 386353 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) at org.jboss.web.tomcat.tc5.session.JBossCacheManager.endTransaction(JBossCacheManager.java:503)
      2005-07-07 14:41:42,217 386353 INFO [STDOUT] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]:) ... 8 more
      


      In consequence the Web-Session-Id is not removed from the SSO-Session and SSO-Session is not removed from the cache.

      If I remove the ClusteredSingleSignOn valve from the configuration, the error goes away (but on session-failover to the other cluster node does not work.)

      Has anybody ever encountered something similar?

      Yours
      Stephan Siano

        • 1. Re: NotSupportedException with ClusteredSingleSignOn

          This is a bug that *may* be resulted because SSO uses a static session reference while the clustered session may return new session references (while still with the same session id).

          Brian has just checked in the code fix into 4.0 code base. It should be available in 4.0.3. If you want to try it now, you should build it yourself.

          Thanks,

          -Ben

          • 2. Re: NotSupportedException with ClusteredSingleSignOn
            siano

            As I watch the CVS, the code in question is currently undergoing some major revision (16 files were changed in the last two days). I suppose, I'd better wait for the next release candidate (and hope the changes will be complete by then).

            However I found the information that the code is currently revised very helpful.