Getting this Error: Server:: Write Abort: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: QueryClass
<p>I have a JAVA server using MultiThread to communicate with client. Everything of the Server works, except for when a client object is send to Server thread. I have narrowed down the problem to this following lines of code. </p>

<p>The error is as a result of this line in the code: 
queryClass= ((QueryClass)inStream.readObject());    //Read data here
and QueryClass is a serialized class. </p>

<p>.Am getting the error above. QueryClass is another class, which i have it searialized: Here is my code.</p>

<pre><code>public void run(){
   try{
    ObjectOutputStream outStream=new ObjectOutputStream(clientSocket.getOutputStream());
    ObjectInputStream inStream=new ObjectInputStream(clientSocket.getInputStream());

         while(true){
       sleep(1);
       queryClass=  ((QueryClass)inStream.readObject());    //Read data here
       serverNotification.UpdateNotification("Performing .. operation for TaxOfficer");

    }           
}catch(Throwable thrown){
         System.err.println("Exception Caught : "+thrown+" deleting thread");

}
</code></pre>
