org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]

Hibernate JIRA | Sapan Bharucha | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Get method in hibernate returns null if no row is found for given ID. My understanding is that ObjectNotFoundException is thrown by hibernate while proxy returned by load is accessed and there is no row found for given ID. But i am getting this exception while using get(). Please let me know if any one you have faced this issue. org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:663) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) ..................................... Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3] at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:447) at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:320) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:277) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) ... 185 more In my product we are using hibernate-core 3.5.1 and Spring 3.0.2.jar . We are calling get method of Spring hibernate template . We are calling hibernates session.get() method by using org.springframework.orm.hibernate3.HibernateTemplate.get(Class<Object>, Serializable) public Object findObject(Class class, Serializable id) throws HibernateException { return (Object) getHibernateTemplate().get(class, id); }

    Hibernate JIRA | 5 years ago | Sapan Bharucha
    org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]
  2. 0

    Get method in hibernate returns null if no row is found for given ID. My understanding is that ObjectNotFoundException is thrown by hibernate while proxy returned by load is accessed and there is no row found for given ID. But i am getting this exception while using get(). Please let me know if any one you have faced this issue. org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:663) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) ..................................... Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3] at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:447) at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:320) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:277) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) ... 185 more In my product we are using hibernate-core 3.5.1 and Spring 3.0.2.jar . We are calling get method of Spring hibernate template . We are calling hibernates session.get() method by using org.springframework.orm.hibernate3.HibernateTemplate.get(Class<Object>, Serializable) public Object findObject(Class class, Serializable id) throws HibernateException { return (Object) getHibernateTemplate().get(class, id); }

    Hibernate JIRA | 5 years ago | Sapan Bharucha
    org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]

  1. musketyr 2 times, last 5 months ago

Root Cause Analysis

  1. org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException

    No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.data.PersonDO#com.data.PersonId@348515a3]

    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException()
  2. Hibernate
    HibernateTemplate.get
    1. org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:663)
    2. org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    3. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    4. org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    5. org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512)
    6. org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506)
    6 frames