4 Replies Latest reply on May 3, 2005 2:05 AM by ben.wang

    failed to restore state; stateful session bean

    jboss_eval

      hi,
      i'm unable replicate the state. i've been getting a few errors,but i'm unable to find a solution ..

      i have 2 instances in acluster.
      i have a jsp page accessing a stateful session bean, wheni refresh the page the counter is incremented.
      if i shutdown one of the server instances, my counter is not incremented, though it still shows me the last increment value.and i get this error

      18:28:06,828 INFO [STDOUT] problem with getCount(): java.rmi.NoSuchObjectException: Could not activate; failed to restore state; CausedByException is:
      C:\JBoss\jboss-4.0.1\server\node1\tmp\sessions\CounterBean-e7yp5j00-4\e7yp3fka-5.ser (The system cannot find the file specified)
      it would be great if somebody could help me work out a solution for this.....
      i've followed the documents available on Jboss to the detail,but ... i guess, there's something i've missed out.

      Thanks

        • 1. Re: failed to restore state; stateful session bean
          jboss_eval

          well, the above error is in addition to the following error, which ben said was "harmless", but then

          18:35:52,921 ERROR [RpcDispatcher] failed invoking method
          java.lang.UnsupportedOperationException: commit() should not be called on TreeCa
          che directly
          at org.jboss.cache.TreeCache.commit(TreeCache.java:2783)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          thanx

          • 2. Re: failed to restore state; stateful session bean

            Did you shutdown node1 or node2?

            -Ben

            • 3. Re: failed to restore state; stateful session bean
              jboss_eval

              i shut down node2. Ok here's what's happening now.

              i have both my server instances up and running,my application deployed in the cluster.(both node 1 and node2).
              when i access my application from node2

              this what i see on the console of node 2:

              09:31:49,156 INFO [STDOUT] Can't find resource org.jboss.web.tomcat.session.LocalStrings org.jboss.web.tomcat.tc5.WebCtxLoader$ENCLoader@4f12c2
              09:31:49,156 INFO [STDOUT] [Ljava.net.URL;@13f7175

              and .. this is what i see on node1 console:

              09:31:13,390 INFO [TreeCache] locking the tree to obtain transient state
              09:31:13,406 INFO [TreeCache] returning the transient state (217 bytes)
              09:31:49,250 ERROR [RpcDispatcher] failed invoking method
              java.lang.UnsupportedOperationException: commit() should not be called on TreeCache directly
              at org.jboss.cache.TreeCache.commit(TreeCache.java:2783)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invokeNativeMethodAccessorImpl.
              java:39)

              assuming that this is not the problem.........i access my jsp file and increment the counter.., whose value is saved in a session variable.,i then shut down node2
              and this is what i can see in my address bar....
              http://localhost:8180/CalcContext/Counter.jsp;jsessionid=iYV8wOCYs28+wFNVZepd0w**.node2

              but my counter value doesn't increment,..........

              this application works fine on Jrun4, so i guess , the problem lies which some missing/wrong jboss specific configuration.
              so please let me know what i can do to get this working...........

              • 4. Re: failed to restore state; stateful session bean

                Release 4.0.2 is due this week. Can you try out that version since I have made couple of fixes there.

                -Ben