Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.