tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narinder Singh <NSi...@quark.stpm.soft.net>
Subject Getting java.io.StreamCorruptedException (URGENT).
Date Wed, 28 Nov 2001 07:53:17 GMT
Hi

I am using tomcat 3.2.3.
I am getting java.io.StreamCorruptedException while trying to read objects
from servlet.

Here is the Exception (stack trace)

java.io.StreamCorruptedException: InputStream does not contain a serialized
object
	at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
	at java.io.ObjectInputStream.<init>(Unknown Source)
	at com.quark.client.Connect.uploadObject(Connect.java:229)


and the code for getting the object follows

   outputToServlet =	new
ObjectOutputStream(urlConnection.getOutputStream());
   outputToServlet.writeObject(objectToServer);
   inputFromServlet = new ObjectInputStream(urlConnection.getInputStream());
// Exception occurs here


I have narrowed down the problem to the 'ObjectInputStream' class's
readStreamHeader() method.
the exception is throws on STREAM_MAGIC mismatch.

Also this exception occurs only for some particular objects (i.e for
particular state).
Can any one please tell what might be the possible cause of problem.


Regards
Narinder
NSingh@quark.stpm.soft.net


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message