Exception: java.io.StreamCorruptedException: invalid type code: 00

前端 未结 2 1545
一整个雨季
一整个雨季 2020-12-20 08:10

When I query through the EJB interface for a entity, under the console it is ok, but switch to query from Swing it throw this exception.

The exception:



        
相关标签:
2条回答
  • 2020-12-20 09:03

    It turns out it is a JRE bug. As my console env is 1.5 and swing is 1.6:

    Bug reference:

    • http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6554519
    • http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434149

    We need to pass this argument to the JVM

    -Dsun.lang.ClassLoader.allowArraySyntax=true

    0 讨论(0)
  • 2020-12-20 09:03

    This exception is generated when the the class corresponding to the serialized object that is found by the JVM has the same serialVersionUid as the serialised class, but is actually a different version (ie: changes were made to the class without changing the version id).

    Check that you have the relevant jar's/class files in the class path?

    0 讨论(0)
提交回复
热议问题