Why do I get a java.io.StreamCorruptedException
The most common cause of this error is due to missing a class on the client classpath that is unmarshalling a serialized object. This can happen in JNDI lookups, ejb calls, etc.
The java serialization layer is unfortunately masking the true cause.
Sun have fixed the error message in recent releases of the JDK.