SerializationException, not sure about the source
hlfsousa May 23, 2006 2:46 PMHi, guys.
I'm receiving an exception, apparently with the return value of a remote call to a session bean. This is the exception stack trace:
org.jboss.serial.exception.SerializationException at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55) at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657) at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204) at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55) at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657) at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204) at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55) at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657) at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:85) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333) at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68) at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:61) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) ... 46 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor203.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.PrivateWritePersister.readData(PrivateWritePersister.java:124) ... 65 more Caused by: org.jboss.serial.exception.SerializationException at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55) at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657) at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204) at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167) at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55) at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657) at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:65) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333) at java.util.HashSet.readObject(HashSet.java:278) ... 69 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.PrivateWritePersister.readData(PrivateWritePersister.java:124) ... 80 more Caused by: java.lang.NullPointerException at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:407) at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2054) at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1971) at java.util.Calendar.setTimeInMillis(Calendar.java:1066) at java.util.Calendar.setTime(Calendar.java:1032) at java.text.SimpleDateFormat.parseAmbiguousDatesAsAfter(SimpleDateFormat.java:733) at java.text.SimpleDateFormat.readObject(SimpleDateFormat.java:1869) ... 85 more
The last call in my session is to EntityManager.persist(). All listeners are executed, database is modified and the transaction is committed. So I assume it has nothing to do with persistence. My next guess is the remote call itself. Since I did some RMI in the past, I made sure of some things before posting:
1. The object returned implements java.io.Serializable, and so do all of its non-transient member variables. It also has a static long serialVersionUID.
2. Client (.war) and server (ejb-jar) modules are packaged together (.ear) and use the same single .class for the parameter and return types.
3. I cleared all compiled files from my app, stopped JBoss, removed tmp and work directories, deployed my application and started JBoss again to make sure there was no caching going on.
Still the error lingers here. Do you people have any idea of what is going on? I'm desperate here