1 Reply Latest reply on Aug 30, 2009 4:05 PM by Arbi Sookazian

    Seam out of memory error

    Ali Gohar Newbie

      Hi,


      I am experiencing out of memory errors in my seam application. It looks like I get the error when JBoss tries to passivate my stateful session beans. I have some stateful session beans which have DataModel annotation which is a list of objects. I did not mention the scope of the bean so I think it is default to conversation scope? I get error when the jboss tries to passivate these stateful beans. Any idea what can i do to get rid of this problem? I am using these memory settings in my jboss:


      -Xms640m -Xmx1408m -XX:PermSize=256m -XX:MaxPermSize=512



      Here is the stack trace:


      2009-08-30 12:24:02,738 FATAL [org.jboss.serial.persister.RegularObjectPersister] error
      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at java.util.HashMap.writeObject(HashMap.java:1039)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
           at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:857)
           at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
      Caused by: java.lang.OutOfMemoryError: Java heap space
           at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
           at java.io.DataOutputStream.write(DataOutputStream.java:90)
           at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.write(DataContainer.java:210)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:71)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.hibernate.engine.EntityEntry.serialize(EntityEntry.java:279)
           at org.hibernate.engine.StatefulPersistenceContext.serialize(StatefulPersistenceContext.java:1228)
           at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:1951)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,868 ERROR [STDERR] java.lang.reflect.InvocationTargetException
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at java.util.HashMap.writeObject(HashMap.java:1039)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2009-08-30 12:24:02,868 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:857)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
      2009-08-30 12:24:02,869 ERROR [STDERR] Caused by: java.lang.OutOfMemoryError: Java heap space
      2009-08-30 12:24:02,869 ERROR [STDERR]      at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
      2009-08-30 12:24:02,869 ERROR [STDERR]      at java.io.DataOutputStream.write(DataOutputStream.java:90)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.write(DataContainer.java:210)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:71)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.hibernate.engine.EntityEntry.serialize(EntityEntry.java:279)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.hibernate.engine.StatefulPersistenceContext.serialize(StatefulPersistenceContext.java:1228)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:1951)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,870 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
      2009-08-30 12:24:02,871 ERROR [STDERR]      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      2009-08-30 12:24:02,875 FATAL [org.jboss.serial.persister.RegularObjectPersister] error
      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
           at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:857)
           at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
      Caused by: java.io.IOException
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at java.util.HashMap.writeObject(HashMap.java:1039)
           ... 25 more
      Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           ... 37 more
      Caused by: java.lang.OutOfMemoryError: Java heap space
           at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
           at java.io.DataOutputStream.write(DataOutputStream.java:90)
           at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.write(DataContainer.java:210)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:71)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
           at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
           at org.hibernate.engine.EntityEntry.serialize(EntityEntry.java:279)
           at org.hibernate.engine.StatefulPersistenceContext.serialize(StatefulPersistenceContext.java:1228)
           at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:1951)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
           at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
           at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
           at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      



      Please help.


      Thanks