[jboss-user] [EJB/JBoss] - Infinite loop Exception while passivating a SFSB

rapowder do-not-reply at jboss.com
Fri Jul 11 07:28:50 EDT 2008


Hello,

I am developing an application in the following environment 

* Framework: Seam 1.2.GA (problem not related to Seam)
* JBoss: 4.0.5.GA + EJB3
* VM: jdk 1.5.0_09-b03 
* DB: postgres
* O/S: Linux Debian

I encountered an exception (see stacktrace) which loops infinitely and forces me to kill the server.
I suspect that the exception occurs at passivation of one of my SFSB. Somehow the serialization process enters in a recursive loop while writing a HashMap, but I am not sure weather the root cause is the IOException or the StackOverflow (see stacktrace).
In the exception there is no trace of my application classes.

I enabled DEBUG level logging for org.jboss.serial and org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager classes, reduced drastically the passivation timeout to 10secs and tried to execute the same actions that I had done when I first noticed the bug on my application, but I didn't yet manage to reproduce it.
In the DEBUG log I noticed that the serialization of the most complex Beans takes very long time to serialize (~2secs). My Beans were actually not very well written in "Serialization-terms" (no serialVersionUID, no declaration of transient fields and no implementation of @PrePassivate and @PostActivate callback methods), since I don't really need passivation in my application. I will probably disable it, but I still would like to understand this bug.

Also, I didn't find very much about similar problems on forums.

Can anyone help?

Here is the stacktrace. In the original "infinite" stacktrace, many parts were repeated, so I replaced them by comments.


  | 2008-06-12 15:34:32,864 FATAL [org.jboss.serial.persister.RegularObjectPersister] error
  | java.lang.reflect.InvocationTargetException
  | 
  | 	at sun.reflect.GeneratedMethodAccessor1236.invoke(Unknown Source)
  | 	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.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.ArrayList.writeObject(ArrayList.java:569)
  | 	at sun.reflect.GeneratedMethodAccessor1235.invoke(Unknown Source)
  | 	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.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:1038)
  | 	
  | 	 ... same exception ~ 20 times
  | 	
  | 	at sun.reflect.GeneratedMethodAccessor1236.invoke(Unknown Source)
  | 	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.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)
  | 	
  | Caused by: java.lang.StackOverflowError
  | 	at java.lang.ClassLoader.defineClass1(Native Method)
  | 	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  | 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
  | 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
  | 	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
  | 	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
  | 	at java.security.AccessController.doPrivileged(Native Method)
  | 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  | 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  | 	at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:145)
  | 	at org.apache.log4j.Category.forcedLog(Category.java:372)
  | 	at org.apache.log4j.Category.fatal(Category.java:363)
  | 	at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:127)
  | 	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.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:1038)
  | 	
  | 	at sun.reflect.GeneratedMethodAccessor1236.invoke(Unknown Source)
  | 	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.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.ArrayList.writeObject(ArrayList.java:569)
  | 	at sun.reflect.GeneratedMethodAccessor1235.invoke(Unknown Source)
  | 	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.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:1038)
  | 	
  | 	 ... same exception ~ 100 times
  | 	
  | 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.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.ArrayList.writeObject(ArrayList.java:569)
  | 	at sun.reflect.GeneratedMethodAccessor1235.invoke(Unknown Source)
  | 	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.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:1038)
  | 	
  | 	 ... Exception loops until app server is manually killed (Ctrl-C ignored)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163835#4163835

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163835



More information about the jboss-user mailing list