I make client socket connection with serversocket and get ObjectInputStream and ObjectOutputStream , then I ObjectOutputStream.writeObject to send a object (without serialVersionUID) to the server, It works fine and if I send a object with serialVersionUID then it throw below exception on server side:
java.net.SocketException: Connection reset
in both case - object implements Serializable interface.
"Connection reset" means that the partner at the other end of the socket has disconnected unexpectedly. Perhaps it threw an exception and crashed because you sent it bad data? At any rate you would have to look at the details of what happens at the other end of the socket to find out for sure.
Joined: Mar 18, 2011
Paul Clapham wrote:"Connection reset" means that the partner at the other end of the socket has disconnected unexpectedly. Perhaps it threw an exception and crashed because you sent it bad data? At any rate you would have to look at the details of what happens at the other end of the socket to find out for sure.
my server is working fine. problem occurred when i sent same object with serialVersionUID and that same object resides on both side server and client.