I get the following error when I log in to my application and then wait for a period of time. The EJB instances start to passivate and then I see the following error
16:22:48,668 ERROR [Log4jService$ThrowableListenerLoggingAdapter] unhandled throwable
javax.ejb.EJBException: Could not passivate; CausedByException is:
org.jboss.resource.adapter.jdbc.local.LocalConnection
at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:2
93)
at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:78)
at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:616)
at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
at java.lang.Thread.run(Thread.java:536)
java.io.NotSerializableException: org.jboss.resource.adapter.jdbc.local.LocalConnection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:2
87)
at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:78)
at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:616)
at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
at java.lang.Thread.run(Thread.java:536)
You're storing a connection as part of your state which is not serializable... ?