11 Replies Latest reply on May 14, 2003 1:55 AM by Sacha Labourey

    JBoss 3.0.6 session replication problem, reproducible error

    Dan K. Newbie

      Hi. I can reproduce the following problem with session replication using JBoss 3.0.6, 'all' configuration.

      Problem:
      1. Start node 1
      2. Access app on node 1
      3. Start up node 2
      4. Access app on node 1
      5. -->> Error

      What I've done:
      - Added to my app's web.xml
      - Enabled JGStore in jbossweb.sar/meta-inf/jboss-service.xml.
      - I've even tried upgrading to the latest javagroups-all.jar (v2.0.6).

      This appears in my first jboss node:

      21:41:48,312 INFO [JGStore] current view members: []
      21:41:48,328 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is mycomputer:1802
      -------------------------------------------------------
      21:41:50,359 INFO [JGStore] viewAccepted([mycomputer:1760|1] [mycomputer:1760,
      mercury:1802])
      21:41:50,359 WARN [JGStore] merging... NYI
      21:41:50,359 INFO [JGStore] current view members: [mycomputer:1760]
      21:41:50,390 INFO [JGStore] initialising our state from another Store
      21:41:50,390 INFO [JGStore] time disparity: 0 secs
      21:41:50,390 INFO [JGStore] receiving 1 sessions...
      21:41:50,390 INFO [jbossweb] Started WebApplicationContext[/snoop,file:/E:/Java
      /Software/t/jboss-3.0.6/server/all/deploy/snoop.war/]
      21:41:50,468 INFO [jbossweb] successfully deployed file:/E:/Java/Software/t/jbo
      ss-3.0.6/server/all/deploy/snoop.war/ to /snoop
      21:41:50,468 INFO [MainDeployer] Deployed package: file:/E:/Java/Software/t/jbo
      ss-3.0.6/server/all/deploy/snoop.war/
      21:41:50,484 INFO [MainDeployer] Starting deployment of package: file:/E:/Java/
      Software/t/jboss-3.0.6/server/all/deploy/web-client.war
      21:41:50,546 INFO [Manager] cloning Manager: org.mortbay.j2ee.session.Manager@8
      59a68
      21:41:50,546 INFO [JBossWebApplicationContext] setDistributableSessionManager o
      rg.mortbay.j2ee.session.Manager@e2b9e5
      21:41:50,593 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationCo
      ntext=5,context=/web-client
      21:41:50,625 INFO [jbossweb] Extract jar:file:/E:/Java/Software/t/jboss-3.0.6/s
      erver/all/tmp/deploy/server/all/deploy/web-client.war/31.web-client.war!/ to E:\
      TEMP\Jetty_0_0_0_0_18080__web-client\webapp
      21:41:51,156 INFO [jbossweb] Started WebApplicationContext[/web-client,Web Clie
      nt]
      21:41:51,171 INFO [jbossweb] successfully deployed file:/E:/Java/Software/t/jbo
      ss-3.0.6/server/all/tmp/deploy/server/all/deploy/web-client.war/31.web-client.wa
      r to /web-client
      21:41:51,187 INFO [MainDeployer] Deployed package: file:/E:/Java/Software/t/jbo
      ss-3.0.6/server/all/deploy/web-client.war
      21:41:51,187 INFO [URLDeploymentScanner] Started
      21:41:51,187 INFO [MainDeployer] Deployed package: file:/E:/Java/Software/t/jbo
      ss-3.0.6/server/all/conf/jboss-service.xml
      21:41:51,187 INFO [Server] JBoss (MX MicroKernel) [3.0.6 (CVSTag=JBoss_3_0_6 Da
      te=200301260037)] Started in 0m:30s:375ms
      21:41:59,890 ERROR [JGStore] this should never happen - code version mismatch ?
      java.lang.NullPointerException
      at org.mortbay.j2ee.session.AbstractReplicatedStore.dispatch(AbstractRep
      licatedStore.java:194)
      at org.mortbay.j2ee.session.JGStore.dispatch(JGStore.java:306)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.javagroups.blocks.MethodCall.invoke(MethodCall.java:321)
      at org.javagroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:265)
      at org.javagroups.blocks.RequestCorrelator.handleRequest(RequestCorrelat
      or.java:531)
      at org.javagroups.blocks.RequestCorrelator.access$100(RequestCorrelator.
      java:37)
      at org.javagroups.blocks.RequestCorrelator$Request.run(RequestCorrelator
      .java:747)
      at org.javagroups.util.ReusableThread.run(ReusableThread.java:208)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: JBoss 3.0.6 session replication problem, reproducible er
          Dan K. Newbie

          Sorry, I meant that the log snippet was from the 2nd jboss node.

          • 2. Re: JBoss 3.0.6 session replication problem, reproducible er
            Dan K. Newbie

            In addition to my own webapp, I used the following snoop servlet (.war) to trouble-shoot the above problem.

            http://www.yorku.ca/dkha/tomcat/snoop/index.htm

            Perhaps it might be useful for the person trying to investigate this...

            Thanks.

            • 3. Re: JBoss 3.0.6 session replication problem, reproducible er
              junkye Newbie

              Hiya Dantest,

              Exactly the same happens to me... so far I had no luck trying to solve this problem and I am now in a desperate situation because I need it to work.

              What are you using btw?

              Red Hat 8
              jdk 1.4.1
              JBoss 3.0.6

              Anybody can help with this?

              Thanks in advance

              • 4. Re: JBoss 3.0.6 session replication problem, reproducible er
                junkye Newbie

                I have the same exact problem...

                Anybody have any clue why this happens?

                Thanks in advance

                • 5. Re: JBoss 3.0.6 session replication problem, reproducible er
                  Sacha Labourey Master

                  Do you mean that by simply dropping the above SNOOP servlet it should fail, right? If that is the case, can you create a bugreport on SF.net and attach the SNOOP servlet as a testcase?

                  Thank you. Cheers,


                  sacha (does it fail only on Jetty clustering?)

                  • 6. Re: JBoss 3.0.6 session replication problem, reproducible er
                    Dan K. Newbie

                    Sacha,

                    No not when I "drop" (meaning undeploy) the servlet. It happens when I start node 2 when node 1 has existing sessions in a webapp that was declared "distributable". Access to the app with those existing sessions would yield the error seen in the log of the SECOND node.

                    However, subsequent new sessions would be fine on both nodes.

                    Bela has suggested that I try to see if I can reproduce it using the HEAD branch of 3.0 so I'll do that as soon as I can.

                    For those interested I'm using:
                    - Debian 3.0 Linux (woody)
                    - Apache 1.3.x with mod_jk1
                    - JBoss 3.0.6 (not from cvs)
                    - Jetty that came with JBoss 3.0.6
                    - 'all' configuration

                    • 7. Re: JBoss 3.0.6 session replication problem, reproducible er
                      Bela Ban Master

                      The problem is due to a NullPointerException. Why don't you instrument the code before the NPE and print (or log) both the arguments that might cause the NPE ? There are 2 vars in line 196 which can cause NPEs.

                      This might be a version mismatch problem. Do you run the same versions of JDK, JBoss on both nodes ?
                      Bela

                      • 8. Re: JBoss 3.0.6 session replication problem, reproducible er
                        Robert Costanzo Newbie

                        I have encountered this same error with JBoss 3.2.1 using the JGStore session replication (Jetty's).

                        The scenario is:

                        1. Server A is running with an active session.

                        2. Server B is started - but never creates the existing session on Server A.

                        3. An attribute changes in the session on Server A.

                        4. Server A propagates this change to Server B.

                        5. Server B attempts to call the method "setLastAccessedTime" in org.mortbay.j2ee.session.AbstractReplicatedStore on a null target, which causes the null pointer exeption.

                        The null target means that a subsription event was never triggered on Server B for the existing session on Server A. This event must only be sent by Server A when it creates the session. However, all existing sessions on Server A need to be created on Server B as soon as it joins the session replication group.

                        Please let me know if this is a known issue and if/when a bug fix is expected.

                        • 9. Re: JBoss 3.0.6 session replication problem, reproducible er
                          Robert Costanzo Newbie

                          I have encountered this same error with JBoss 3.2.1 using the JGStore session replication (Jetty's).

                          The scenario is:

                          1. Server A is running with an active session.

                          2. Server B is started - but never creates the existing session on Server A.

                          3. An attribute changes in the session on Server A.

                          4. Server A propagates this change to Server B.

                          5. Server B attempts to call the method "setLastAccessedTime" in org.mortbay.j2ee.session.AbstractReplicatedStore on a null target, which causes the null pointer exeption.

                          The null target means that a subsription event was never triggered on Server B for the existing session on Server A. This event must only be sent by Server A when it creates the session. However, all existing sessions on Server A need to be created on Server B as soon as it joins the session replication group.

                          Please let me know if this is a known issue and if/when a bug fix is expected, or if more details on the issue are needed.

                          • 10. Re: JBoss 3.0.6 session replication problem, reproducible er
                            Robert Costanzo Newbie

                            I have encountered this same error with JBoss 3.2.1 using the JGStore session replication (Jetty's).

                            The scenario is:

                            1. Server A is running with an active session.

                            2. Server B is started - but never creates the existing session on Server A.

                            3. An attribute changes in the session on Server A.

                            4. Server A propagates this change to Server B.

                            5. Server B attempts to call the method "setLastAccessedTime" in org.mortbay.j2ee.session.AbstractReplicatedStore on a null target, which causes the null pointer exeption.

                            The null target means that a subsription event was never triggered on Server B for the existing session on Server A. This event must only be sent by Server A when it creates the session. However, all existing sessions on Server A need to be created on Server B as soon as it joins the session replication group.

                            Please let me know if this is a known issue and if/when a bug fix is expected.

                            • 11. Re: JBoss 3.0.6 session replication problem, reproducible er
                              Sacha Labourey Master

                              Then I suggest you post this request to Jetty's ML as Jules doesn't seem to follow this forum.

                              Cheers,


                              sacha