Hello, (I dont think my other mail went through so I try it again. If this is a repost I apologise).
I need some help with a little problem I have. I have a client which talks to a servlet. The servlet in its turn handles communication with some beans. The communication between the client and the servlet is handled by opening a URLConnection which is then mapped into a ObjectOutputStream. The problem is that a lot of the times I try to send things to the servlet I get either a StreamCorruptedException or a EOFException in the servlet. I can't understand what the problem is. The object I send through is serializabled. Here is the errors I get (they don't appear at the same time, though). And btw, the "Version Mismatch" have different numbers each time. java.io.StreamCorruptedException: Version Mismatch, Expected 5 and got 58 at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) at com.myproject.Servlet.doPost(Servlet.java:169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62) java.io.EOFException at java.io.DataInputStream.readFully(Unknown Source) at java.io.ObjectInputStream.readUTFBody(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.io.ObjectInputStream.inputClassFields(Unknown Source) at java.io.ObjectInputStream.defaultReadObject(Unknown Source) at java.io.ObjectInputStream.inputObject(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at com.myproject.Servlet.doPost(Servlet.java:170) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62) I would greatly appriciate if someone have inputs in this subject. Thanks in advance! /Mathias Ohlsson