Skip to Content
author's profile photo
Former Member

OptionalDataException when reading serialized handle (was6.40 sneak preview

Hello, I'm trying to read a serialised handle (EJBHandle serialized to an ObjectOutputStream) and I have:

java.io.OptionalDataException

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1294)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

at com.sap.engine.services.ejb.handle.HandleImpl.readStub(HandleImpl.jav

a:120)

at com.sap.engine.services.ejb.handle.HandleImpl.readObject(HandleImpl.j

ava:73)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838

)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1

646)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

Any ideas anyone?

Thanks,

JP

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Posted on Apr 02, 2004 at 12:56 PM

    Couold you please show me the code that is writing and reading this?

    Could it be you are using an inherited class that overwrites some methods?

    Regards,

    Benny

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Apr 19, 2004 at 04:28 PM

    I'm not sure "where you are" when you get the error, but typically classes from "java.io.*" are not legal in an EJB environment. Maybe you can save your handle in your special JNDI environment instead?

    Dale

    Add comment
    10|10000 characters needed characters exceeded