problem with stateful session bean


EJB programming & troubleshooting: problem with stateful session bean

  1. problem with stateful session bean (2 messages)

    hi guys

    i have a problem when maintaining a collection of local entity component interfaces as the state of a stateful session bean.

    i get the following error on jboss , could anyone tell me the reason for this . because from what i understand the aforementioned collection is serializable.

    any help on this will be greatly appreciated.

    javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
            at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(State
            at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstan
            at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.j
            at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$
            at java.util.TimerThread.mainLoop(
            at java.util.logging.LogManager
  2. From what I can tell from the stack trace, you seem to have a reference to the java.util.logging.LogManager in your class. The LogManager does not implement Serializable and therefore JBoss cannot passivate your session bean (since some references in the session bean cannot be serialized).
  3. problem with stateful session bean[ Go to top ]

    Is it possible for you to subclass from the Log Manager but implement the interface so that you can have your log object and be serializable.

    That would solve your problem but it seems funny that you want to persist the log manager when it would be better that you obtain the Logger object from the LogManager and use it as a local object?