 <p>When you do writeObject, the objevt you write needs to be Serializable. Try to change the signature of your <code>copy</code>-method to </p> <pre><code>public static Object copy(Serializable oldObj) </code></pre> <p>The error message will be clearer.</p>