I want to insert web application data to mysql database. I'm using struts, jsp and hibernet.This is my action class.
I got the error saying
"org.hibernate. PropertyValueEx ception: not-null property references a null or transient value"
I'm new to struts and hibernet. so still couldn't understand the error.Please help me..
Code:
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MemberActionForm formbean = (MembeActionForm) form; data.Dvb user = new data.Dvb(); viewer.setName(formbean.getMembername()); viewer.setBirthDate(formbean.getBirthdate()); Session s = data.DataAccess.getDataAccess().getSession(); Transaction tr = s.beginTransaction(); s.save(viewer); tr.commit(); return mapping.findForward(SUCCESS); } }
"org.hibernate. PropertyValueEx ception: not-null property references a null or transient value"
I'm new to struts and hibernet. so still couldn't understand the error.Please help me..