 <p><a href="http://examples.javacodegeeks.com/java-basics/exceptions/java-io-notserializableexception-how-to-solve-not-serializable-exception/" rel="nofollow">NotSerializableException</a> is thrown when an instance of a class must implement the Serializable interface.</p> <p>If the class that throws the exception does not belong to a third-party library, find the class and make it implement the serializable interface.</p> <p>If you do not want to serialize the objects in the class, you can mark the objects as <a href="http://stackoverflow.com/questions/910374/why-does-java-have-transient-variables">transient</a>, to make the serializable runtime ignore the objects.</p> <p>You can read about it <a href="http://examples.javacodegeeks.com/java-basics/exceptions/java-io-notserializableexception-how-to-solve-not-serializable-exception/" rel="nofollow">here</a></p>