Look at the API doc for this class: java.io.NotSerializableException
It explains the problem.

Note: Java naming conventions says that class names should begin with an UPPERCASE letter: Names and...