5 Replies Latest reply on Jun 10, 2003 5:43 AM by tommo

    Strange Stateful Session bean Exception

    sczapek

      Since working with JBoss 3.x I am getting the following Exception from my project:

      ///////////////////////////////////////////////////////
      [org.jboss.web.localhost.Engine] ----- Root Cause -----
      java.rmi.NoSuchObjectException: Could not activate; CausedByException is:
      ... \jboss-3.0.4_tomcat-4.1.12\server\default\db\sessions\MaterialControl\1049358688225.ser (the system cannot find the requested file)
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:186)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212)

      .....

      /////////////////////////////////////////////////////////////

      It always happens after 5-20 minutes of doing nothing on the web client. JBoss terminates the session after exactly 30 minutes, but it deletes some of these serialized beans much earlier.

      Thank you for your help in advance.

      Sebastian

        • 1. Re: Strange Stateful Session bean Exception
          raja05

          Increase the value of max-bean-life in your configuration. The way the beans are removed is based on this

          (max-bean-life) - (max-bean-age)

          By default, max-bean-life is 1800(30mins) and max-bean-age is 600(10mins). So if any beans exceeds this, it gets deleted. Look in LRUStatefulcontextcachepolicy.java's run method.

          -Raj

          • 2. Re: Strange Stateful Session bean Exception
            tommo

            We are having the exact same problem and were originally delighted to see this thread, except - what is the answer?
            Surely increasing the suggested value simply means that the bean will disappear at a different time interval?
            Raj, would you care to elaborate?

            Thanks.

            • 3. Re: Strange Stateful Session bean Exception

              Are there any other errors ? Something like could not passivate or error during passivation ?

              • 4. Re: Strange Stateful Session bean Exception
                raja05

                Hi Tommo
                Do you have a timeout associated with your sessions? Make sure that your
                (max-bean-life - max-age-life) is equivalent to that interval. That case, you should never have this exception as your HTTP sessions should expire that point.

                -raj

                • 5. Re: Strange Stateful Session bean Exception
                  tommo

                  Thanks for the suggestions guys, both relevant.
                  We have resolved the problem - the scope for the bean in our JSP was "application", we have now changed this to "session" - this was/is a tricky one for us as we slavishly followed the Sun Duke's Bank Application model - our application is under review and the overall design will be modified.

                  Tom.