I have a PersistenceCapable class
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyClass
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
..........
..........
}
In my servlet, I need to store object of this class in session
............
MyClass u = new MyClass();
......
......
HttpSession session = req.getSession(true);
session.setAttribute("SV", u);
........
I am getting java.lang.RuntimeException: java.io.NotSerializableException:
What is this?