[jboss-dev-forums] [Design of JBoss Serialization] - Mustang Serialization problems.

thammoud do-not-reply at jboss.com
Fri Aug 11 13:42:09 EDT 2006


Hello,

We have encountered a serialization problem when we moved to JDK 1.6. The following EJB throws an exception (Below).

public class TestServiceBean implements TestService {
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public Format getFormat() {
        return DateFormat.getDateInstance(DateFormat.SHORT);
    }
}

The code works perfectly in 1.5. We tried the latest nightly build of Mustang to no avail. Peforming a deep clone to the same object locally works fine thus leading us to believe that the interaction with JBOSS is what is causing this problem. We are using 4.0.4 JA on linux. Thanks for any info.

Caused by: java.rmi.MarshalException: Failed to communicate.  Problem during marshalling/unmarshalling; nested exception is:
        java.io.StreamCorruptedException: invalid type code: 00
        at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:306)
        at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
        at org.jboss.remoting.Client.invoke(Client.java:525)
        at org.jboss.remoting.Client.invoke(Client.java:488)
        at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
        at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
        at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
        at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
        at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
        ... 2 more
Caused by: java.io.StreamCorruptedException: invalid type code: 00
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1356)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1642)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
        at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
        at java.util.Calendar.readObject(Calendar.java:2609)
        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:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
        at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
        at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)



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

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



More information about the jboss-dev-forums mailing list