dcsimg
problem deserializing class: StreamCorruptedException in getClassDesc method
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, October 29, 2002 02:16 AM

I´m serializing a class, sending from a servlet to an applet, and when I deserialize the class inside the browser I get a StreamCorruptedException, in the method getClassDesc. But when I run (or debug) the applet inside my IDE (NetBeans) the deserializing process works OK.
I'm thinking in a classpath problem, but I have revised the classes used in the serialized class and I put all of them in the applet jar file.
Any clues?

Re: problem deserializing class: StreamCorruptedException in getClassDesc method

Posted By:   Alexander_Zynevich  
Posted On:   Thursday, October 31, 2002 12:33 PM

Hello,

that is easy:

NetBeans and may be your server both work with JDK1.3 Applet may work with Java 1.1 or Java 1.2.2... that is why applet couldn't have read serialized class (versions of serialized streams are different). If you will serialize somthing with your applet it will certainly be read by servlet.

However try to confugure server side ObjectOutputStream MAY BE (I am not sure) you could create backward capable ObjectOutputStream


Alexander Zynevch
zynevich@mail.ru
Brainbench MVP for Java 1
http://www.brainbench.com/
About | Sitemap | Contact