當我通過EJB接口查詢實體時,在控制檯下它是可以的,但切換到從Swing查詢它會拋出此異常。異常:java.io.StreamCorruptedException:無效的類型代碼:00
例外:
java.rmi.UnmarshalException: failed to unmarshal MY_ENTITY****; nested exception is:
java.io.StreamCorruptedException: invalid type code: 00
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:219)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
at ***.****_6ndxy4_EOImpl_922_WLStub.getProductInformation(Unknown Source)
at MY_CLASS****.getProductInformation(*****.java:460)
at ******$5.run(OrigBlotter.java:318)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.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.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:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
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 weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:217)
請告訴我們相關的代碼。是的,不要忘記包含相關的堆棧跟蹤。 – 2010-02-10 04:47:45