5 Replies Latest reply on Sep 3, 2008 10:01 AM by spezam

    Dirty Metadata - stucked

      Hello,
      I'm configuring a Jboss (4.2.3.GA - jdk 6.0_04) cluster on Centos Linux 5.2 following this document

      http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html
      section:
      16.5. HTTP Services

      Everything is working fine, the two Jboss instances see each other and according to jboss.cache:service=TomcatClusteringCache MBean/printDetails you can see the same web session details on the two nodes.

      The application sets an Anonymous session as soon as the user hits the first page. The same session is updated with more attributes when the user login.

      When I test the session replication with the application I do the following:
      - access the application on one node (depends on where the loadbalancer is sending me)
      - login
      - move around the application
      - take down the node where I'm logged in and refresh the page so the request is directed on the second node.

      As soon as I refresh I got the following exception:
      08:53:39,633 ERROR [JBossCacheService] loadSession(): id: rBj5KyYzuQuqHC0lK4BSWA** exception occurred during deserialization
      java.lang.ArrayStoreException: org.springframework.security.GrantedAuthorityImpl



      Debugging the application on both the nodes I can notice differences between the session attributes on the replicated node.
      ex.
      sessionMetadataDirty = true
      version = 0

      ...


      Anyone has an idea why this is happening?
      Is there a way to check the reason why the session attributes aren't replicated correctly? Any debugging option?

      Thanks in advance for your answer.

      Matteo
      Linux System Manager - Fi


        • 1. Re: Dirty Metadata - stucked
          zippy1

          Hi there...

          I have had this problem and it has been driving me crazy. I have performed exactly the same on Jboss 4.2.2.GA. It's seems to be a problem with session replication using JDK 6. You have to start up Jboss with the following:

          -Dsun.lang.ClassLoader.allowArraySyntax=true

          in the run.conf which helped solve my problem.

          Hope this helps - let me know if this fixes it for you...

          • 2. Re: Dirty Metadata - stucked

            Zippy,
            thanks for the reply.

            The error is not thrown anymore, but it seems the session is not replicated at all.

            Thanks,
            matteo

            • 3. Re: Dirty Metadata - stucked
              zippy1

              Hi..

              I think this might be another issue. In my setup I've checked the session replication through JMX console and I can see the sessions being replicated correctly. I would double check settings (maybe CacheMode and ClusterConfig UDP settings) in the jboss-service.xml (in \server\\deploy\jboss-web-cluster.sar\META-INF directory).

              If that looks ok then on one of the nodes in JMX console go to the the service that is replicating the session data, in my case TomcatClusteringCache service. Check the Members property to make sure all the nodes are appearing.

              Hope this helps.

              • 4. Re: Dirty Metadata - stucked

                I will do that, thanks.

                Also, I'm investigating on other solutions like Terracotta...it's seems more powerful and with better scaling capabilities.

                matteo

                • 5. Re: Dirty Metadata - stucked

                  Ok, even after the

                  -Dsun.lang.ClassLoader.allowArraySyntax=true

                  flag on the JAVA_OPTS, I got this exception.

                  15:57:27,073 ERROR [JBossCacheService] loadSession(): id: TLvxyxOX2p5VtvjkEuqjoQ** exception occurred during deserialization
                  java.lang.ArrayStoreException: org.springframework.security.GrantedAuthorityImpl


                  Terracotta worked great, and the implementation took no time. Why this has to be so complicated and undocumented!