1 Reply Latest reply on Oct 20, 2005 8:09 PM by Emmanuel Bernard

    java.io.NotSerializableException: org.hibernate.ejb.callback

    Xiang Qinxian Newbie

      hi, when run jboss-seam booking sample I get a exception as follows,
      it seems EntityCallbackHandler should implements a Serializable interface or not be writed to object stram:

      2005-10-19 08:12:47,251 DEBUG [org.hibernate.jdbc.ConnectionManager] running Session.finalize()
      2005-10-19 08:12:48,854 DEBUG [org.hibernate.jdbc.ConnectionManager] running Session.finalize()
      2005-10-19 08:15:53,942 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Attempting to passivate; id=5c4o15x-qgvtki-eeyuoah0-1-eeyuqfwf-a
      2005-10-19 08:15:53,942 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Saving session state to: F:\jboss-4.0.3\server\default\tmp\sessions\org.jboss.seam.example.booking.HotelBookingAction-eeyuoz8q-7\5c4o15x-qgvtki-eeyuoah0-1-eeyuqfwf-a.ser
      2005-10-19 08:15:54,758 DEBUG [org.hibernate.impl.SessionImpl] serializing session
      2005-10-19 08:15:54,834 DEBUG [org.hibernate.impl.SessionFactoryImpl] serializing: 40288155070636c201070636cb090000
      2005-10-19 08:15:55,076 INFO [STDOUT] Exception in thread "Timer-3"
      2005-10-19 08:15:55,106 INFO [STDOUT] javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
      org.hibernate.ejb.callback.EntityCallbackHandler
      2005-10-19 08:15:55,121 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:333)
      2005-10-19 08:15:55,121 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143)
      2005-10-19 08:15:55,121 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)
      2005-10-19 08:15:55,121 INFO [STDOUT] java.io.NotSerializableException: org.hibernate.ejb.callback.EntityCallbackHandler
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:380)
      2005-10-19 08:15:55,121 INFO [STDOUT] at org.hibernate.impl.SessionFactoryImpl.writeObject(SessionFactoryImpl.java:743)
      2005-10-19 08:15:55,121 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2005-10-19 08:15:55,121 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2005-10-19 08:15:55,121 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,121 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      2005-10-19 08:15:55,121 INFO [STDOUT] at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:196)
      2005-10-19 08:15:55,121 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2005-10-19 08:15:55,136 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2005-10-19 08:15:55,136 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.ejb3.entity.ExtendedEntityManager.writeExternal(ExtendedEntityManager.java:71)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.aop.metadata.SimpleMetaData.writeExternal(SimpleMetaData.java:211)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:140)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      2005-10-19 08:15:55,136 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:324)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143)
      2005-10-19 08:15:55,136 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92)
      2005-10-19 08:15:55,151 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512)
      2005-10-19 08:15:55,151 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)