HibernateException « Update « JPA Q&A





1. saveOrUpdate throws HibernateException    forum.hibernate.org

Regular Joined: Thu Feb 05, 2004 6:51 am Posts: 50 Hi, I'm using Hibernate 2.1.1 on Jonas. I have a very simple class and I want to store objet of it. The point is that the object I want to save may already be stored in the database, in this case I want to update it. So I though that the ...

2. HibernateException :could not save an object    forum.hibernate.org

Hi, I get the following error when trying to insert a record into the database: net.sf.hibernate.exception.GenericJDBCException: Could not save object at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90) at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:794) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749) at sg.gov.ciris.dao.MtMergeHdrDao.createMergeRequestRecord(MtMergeHdrDao.java:752) at sg.gov.ciris.idm.MtMgrBean.createMergeRequestRecord(MtMgrBean.java:2796) at sg.gov.ciris.idm.MtMgr_lpphm8_ELOImpl.createMergeRequestRecord(MtMgr_lpphm8_ELOImpl.java:3105) at sg.gov.ciris.idm.delegate.MtDelegate.createMergeRequestRecord(MtDelegate.java:1296) at idm.mergeFinRequest.MergeFinRequestController.processMergeRequest(MergeFinRequestController.jpf:300) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1498) at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1433) at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:764) at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211) at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:594) ...

3. save() does not throws an HibernateException (Object exists)    forum.hibernate.org

Hi, it may be a very simple question, but have no idea left what's wrong. First of all, I want to ask the user, if he (or she) wants to override an already stored object. So I assumed that , when I call save and the object already exits, I would get an HibernateException. So I can catch this HibernateException, ask ...