java.io.StreamCorruptedException with distributed transaction
The java.io.StreamCorruptedException is thrown when using distributed transaction. After some debugging steps, the JDK is throwing this exception instead of a ClassNotFoundException which has been lost So, If you've this exception, check CNFE at ObjectInputStream.read method. java.io.StreamCorruptedException: invalid type code: 00 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:321) at org.ow2.carol.rmi.jrmp.server.JUnicastServerRef.dispatch(JUnicastServerRef.java:171) at sun.rmi.transport.Transport1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport
ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor
Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.StreamCorruptedException: invalid type code: 00 at java.io.ObjectInputStream
BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2464) at java.io.ObjectInputStreamBlockDataInputStream.refill(ObjectInputStream.java:2499) at java.io.ObjectInputStream
BlockDataInputStream.skipBlockData(ObjectInputStream.java:2401) at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1897) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1874) 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 sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:316) ... 10 more