• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

readObject() throwing EOFException

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Arthur, where are your pants? Check under this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic