The error is reported because all fields in class implementing Serializable
must also be Serializable
.
Making fields transient
Making fields transient
means that they should be ignored in serialization, and I think you don't want that (because they are included in hibernate-mapping file).
From the Java Language Specification, Java SE 7 Edition, Section 8.3.1.3. transient Fields:
Variables may be marked transient to indicate that they are not part of the persistent state of an object.
Making classes implement Serializable
The classes NotifEventGroup
, EmailTmplt
and SmsTmplt
should also implement Serializable
-interface. Implementing Serializable
actually does nothing, it is just a marker interface for notifying users that the class can be serialized.