Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

Partially deserialized objects?

Thread view: 
Eric Czarny - 30 Nov 2007 21:53 GMT
I am trying to send a serialized object from a JSP to another servlet
through HTTP, but I keep running into an invalid stream header
exception. My theory is that the servlet is (for some reason or
another) not reading the whole serialized object. I have tried placing
logging statements at different stages of the serialized object. If I
specify the Content-Length of the serialized object more logging
statements show up, but I still run into the invalid stream header
problem. Am I missing something critical? Has anybody else seen this
(or a similar) problem before?

Cheers,
Eric Czarny
Esmond Pitt - 01 Dec 2007 01:06 GMT
> Has anybody else seen this
> (or a similar) problem before?

This is usually caused by different lifetimes of the ObjectOutputStream
and ObjectInputStream on one side or the other when sending multiple
objects. You need to use one of each for the life of the connection, and
make sure you flush & close the OOS, not the stream it encloses.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.