By: Kingshore Naidu

Hi,
i wrote int i = (Integer) session.save(student); here i am getting typecasting error. Because the save(obj) return type is Serializable. it means its return object reference value so changed that line as

long i = (Long) session.save(student);

now it working fine .... Let me know if i am mistake....
Thanks ...