1 Reply Latest reply on Sep 11, 2002 5:45 AM by lbasili

    Could not activate Stateful Session Bean

    lbasili

      Hello,
      when the container tries to activate a passivated Stateful Session Bean, the following exception is
      thrown:

      Exception: RemoteException occurred in server thread; nested exception is:
      javax.transaction.TransactionRolledbackException: Could not activate; nested exception is:
      java.io.FileNotFoundException: /home/lbasili/bin/java/JBoss-2.4.4/db/sessions/SessionController/1031671301664.ser (No such file or directory); nested exception is:
      java.rmi.NoSuchObjectException: Could not activate; nested exception is:
      java.io.FileNotFoundException: /home/lbasili/bin/java/JBoss-2.4.4/db/sessions/SessionController/1031671301664.ser (No such file or directory)

      this session bean declares all fields as public and they are serializable. No exception is thrown in the passivation phase.
      I am using JBoss-2.4.4 with JDK1.3.1:03 on a RedHat Linux 7.2.

      Can you help me ? I searched forums and I found that some people have the same problem, but I couldn't find a solution.

      Thank you for paying attention,

      Ludovico Basili

        • 1. Re: Could not activate Stateful Session Bean
          lbasili

          Hello,

          I am trying to find a solution to the problem.
          I modified the configuration for LRUStatefulContextCachePolicy in the standardjboss.xml file.
          To make SessionBeans passivate in a shorter period, I reduced the bean-max-age to 30 secs and the overager-period (15 secs).
          The max-bean life is 1800 secs.
          Now, when the bean becomes passivated (after about one minute of pending session), and I try to reactivate it, I obtain a different exception, that involves the security context (why?):

          javax.transaction.TransactionRolledbackException: null
          Embedded Exception
          No security context set; nested exception is:
          java.rmi.NoSuchObjectException: null
          Embedded Exception
          No security context set
          java.rmi.NoSuchObjectException: null
          Embedded Exception
          No security context set
          at
          org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:233)
          at
          org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:193)
          at
          org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
          at
          org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
          at
          org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:339)

          Thanks,
          LB