aspose file tools*
The moose likes I/O and Streams and the fly likes readObject() throwing EOFException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "readObject() throwing EOFException" Watch "readObject() throwing EOFException" New topic
Author

readObject() throwing EOFException

Colleen Lynch
Greenhorn

Joined: Jun 18, 2001
Posts: 15
Hi there...
I am trying to send an object (Vector) from an applet to a servlet. When I call readObject in the servlet, it throws an EOFException. Does anyone have any idea what could be wrong here?
Here is the code in the applet:

And for the servlet:

If anyone has any ideas, I would really appreciate it!!!
Thanks
[This message has been edited by Colleen Lynch (edited November 07, 2001).]
Jon Branham
Greenhorn

Joined: Mar 16, 2003
Posts: 2
I actually have the same problem with a shopping cart object. Within its readObject method i print out all of the data, which is read in perfectly. The readObject method exits and somewhere between that and the typecasting back to the Cart object i get the EOFException.
Jon Branham
Greenhorn

Joined: Mar 16, 2003
Posts: 2
ok im dumb, i was serializing the cart into a mysql binary field that was too small. I realized this after comparing byte lengths of the input and output byte arrays. Thats where my EOFException came from.
 
jQuery in Action, 2nd edition
 
subject: readObject() throwing EOFException