UserDaoImpl must implement the java.io.Serializable interface if it is to be serialized (your stack trace indicates an attempt is made to write an instance of the class to an object stream).
The instance to be serialized, along with all objects in the object graph of that instance, must all be serializable.
From the javadocs for Serializable,
Serializability of a class is enabled by the class implementing the
java.io.Serializable interface...When traversing a graph, an object
may be encountered that does not support the Serializable interface.
In this case the NotSerializableException will be thrown and will
identify the class of the non-serializable object.
Note that there are exceptions to these rules. I recommend that you read the Java Object Serialization Specification for a full understanding of when object serialization takes place and it what it takes to avoid a NotSerializableException.