I am sending Object for client to server modifying that object at server side and resending it to client. Sending object form client to server is fine its working properly b
java.net.SocketException socket is closed
This exception means that you closed the socket, and then continued to try to use it.
os.close();
And you closed it here. Closing either the input or the output stream of a Socket closes the other stream and the Socket.
Socket
Socket.