Skip to main content

Serializing bug with X509Certificate

No replies
primetomas
Offline
Joined: 2006-08-16

Hi, I have found what I think looks like a bug.

I am calling a remote (not local) stateless session bean that is returning a serializable object. One of the attibutes in the object is:
Collection certs;
On the server side all is fine, I added debug code so the Collection is of type:
java.util.ArrayList
The Collection contains one object of type:
sun.security.x509.X509CertImpl

On the client side the following exception is thrown:
24/11/2006 09:02:33 com.sun.corba.ee.impl.orbutil.CacheTable put_table
WARNING: "IOP00710275: (INTERNAL) Old entry in serialization indirection table has a different value than the value being added with the same key"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 275 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5909)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.duplicateIndirectionOffset(ORBUtilSystemException.java:5931)
at com.sun.corba.ee.impl.orbutil.CacheTable.put_table(CacheTable.java:90)
at com.sun.corba.ee.impl.orbutil.CacheTable.put(CacheTable.java:79)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1039)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:754)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:844)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:275)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:361)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:524)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
at java.util.ArrayList.readObject(ArrayList.java:591)

If I remove this attribute, or simple set it to null or an empty ArrayList instead, all works fine.

glassfish seems to have a problem deserializing X509Certificate, which should not be a proablem. It is not a problem for other application servers as I have tested on both JBoss and Weblogic.

I run:
glassfish-installer-v1_ur1-b14.jar
Sun java 1.5.0_06 or 08
Windows XP, Ubuntu Linux 32 bit or 64 bit.

So the error occurs on all plattforms...

Kind regards,
Tomas Gustavsson
PrimeKey Solutions AB