Hi John,
It could be that the AttemptRequest object references some other object that
is not Serializable.
An analogy would be putting some non-serializable object in a Hashtable
(which is Serializable) and trying to serialize the Hashtable.
ted stockwell
> -----Original Message-----
> From: John Brecht [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 08, 1999 1:34 PM
> To: Java Apache Users
> Subject: Serialization/Deserialization
>
> I have created an Object that implements Serializable. My client seems to
> be able to write it to an ObjectOutputStream, but when the Servlet tries
> to deserialize it, it gives the error:
>
> [08/04/1999 14:19:14:440 EDT] java.io.InvalidClassException:
> edu.msu.lite.JHomework.AttemptRequest; is not Serializable
> at
> java.io.ObjectStreamClass.verifyInstanceDeserialization(ObjectStreamClass.
> java:1042)
> at java.io.ObjectInputStream.inputObject(Compiled Code)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
> at edu.msu.lite.JHomework.Dispatcher.doPost(Dispatcher.java:45)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> at org.apache.jserv.JServConnection.run(JServConnection.java:359)
> at java.lang.Thread.run(Thread.java:479)
>
> The Object AttemptRequest is the Object that SHOULD be Serializable, at
> least it "implements Serializable". Dispatcher is the name of my servlet
> Class. The same class file for AttemptRequest is in the client directory
> and in the servlet directory. I can't debug within the servlet to get
> more info because I can't make logging work. Has anyone run into similar
> trouble with deserialization?
>
>
>
> ---
> John Brecht
> Department of Physics and Astronomy
> Michigan State University
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]