• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

readObject() throwing EOFException

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic