Originally posted by Shekar Atmakur:
I dont know what you mean by "Format of the Object",
If you serialized an object to a database then added a field or made some other change to the object, the serialized version will no longer match the object specification and an attempt to read it out of the database will fail.
The documentation for
ObjectInputStream has some information on diagnosing the cause of an exception. My guess is that the field in the database is null. The output stream writes a header to the stream to identify it as a serialized object. The input stream tries to read the header when you call the constructor and if it doesn't exist, will throw an EOF exception.
[ June 16, 2005: Message edited by: Joe Ess ]