4 Replies Latest reply on Sep 29, 2002 6:58 PM by Michel Szybist

    http session clustering exception

    Michel Szybist Newbie

      Hi to all.

      I'm using jboss-3.0.2_tomcat-4.0.4 on two nodes:
      - RH 7 Linux box
      - Win2K box
      both with J2SE 1.3.1 and J2EE 1.3.1

      When deploying my EAR, in .../all/log/server.log I have:
      ...
      2002-09-22 12:07:53,099 INFO [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] ClusteredHTTPSessionService found
      2002-09-22 12:07:53,109 INFO [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Enabled clustering support for ctxPath=/a7
      ...
      So http session clustering seems to be installed, up and running.

      My JSESSIONID looks like this: JSESSIONID=wTw7s4kW2FEZ5XDpj+hKLQ**;Path=/a7
      (and NOT like this: JSESSIONID=7D8D79CBB07BF61090C76B4D4058AB86;Path=/a7)

      Each time I call my servlet (http://192.168.0.1:8080/a7/mine) I get this exception: (on the host on which it is called, either on Linux or on Win2K)

      [org.jboss.web.catalina.session.InstantSnapshotManager] Failed to replicate sessionID:wTw7s4kW2FEZ5XDpj+hKLQ**
      javax.ejb.EJBException: Exception in setHttpSession: java.lang.NullPointerException
      at org.jboss.ha.httpsession.server.ClusteredHTTPSessionService.setHttpSession(ClusteredHTTPSessionService.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy25.setHttpSession(Unknown Source)
      at org.jboss.web.catalina.session.ClusterManager.storeSession(ClusterManager.java:448)
      at org.jboss.web.catalina.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:38)
      at org.jboss.web.catalina.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:88)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:479)


      What did I wrong ?

      I bought the Clustering JBoss doc, but there's nothing inside about HTTP session clustering.

      I put the tag in web.xml.
      Should I do something else ?

      thanks,
      Michel.


      --
      Michel Szybist
      michel@szybist.net
      Fax: +33 (0)173729897
      SMS: http://www.szybist.net/

        • 1. Re: http session clustering exception
          Thomas Peuss Newbie

          Hello!

          > My JSESSIONID looks like this:
          > JSESSIONID=wTw7s4kW2FEZ5XDpj+hKLQ**;Path=/a7
          > (and NOT like this:
          > JSESSIONID=7D8D79CBB07BF61090C76B4D4058AB86;Path=/a7)

          This is ok. This shows that the clustering has started up right.

          >
          > [org.jboss.web.catalina.session.InstantSnapshotManager
          > Failed to replicate
          > sessionID:wTw7s4kW2FEZ5XDpj+hKLQ**
          > javax.ejb.EJBException: Exception in setHttpSession:
          > java.lang.NullPointerException

          Maybe you try to put something into the session that is not marked Serializable. Every object that you put into the session (even indirectly!!!) must be serializable.

          Hope this helps
          Thomas

          • 2. Re: http session clustering exception
            Michel Szybist Newbie

            hmmm. no.
            I just put an Integer in the HttpSession...
            (it's a simple sample :)

            When I switch clustering OFF, it works without any exception.

            cheers,
            Michel

            • 3. Re: http session clustering exception
              Thomas Peuss Newbie

              Do you have multicast enabled for your network devices?

              CU
              Thomas

              • 4. Re: http session clustering exception
                Michel Szybist Newbie

                I don't know.
                But I should not need it: (or am I wrong ?)


                mszPartition

                TCP(start_port=7800):TCPPING(initial_hosts=192.168.0.1[7800];port_range=5;timeout=3000;num_initial_members=2;up_thread=true;down_thread=true):VERIFY_SUSPECT(timeout=1500;down_thread=false;up_thread=false):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=false;down_thread=true;up_thread=true)




                I don't use multicast, do I ?

                M.