org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1]

Hibernate JIRA | Sergey Vladimirov | 1 decade 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

    cfg.addAnnotatedClass(EJB30User.class); cfg.setProperty( "hibernate.ejb.classcache." + EJB30User.class.getName(), "read-write"); ... EntityManager entityManager = getEntityManagerFactory() .createEntityManager(PersistenceContextType.EXTENDED); EJB30User user = new EJB30User(); user.setId(1); user.setName("1"); entityManager.persist(user); entityManager.close(); entityManager = getEntityManagerFactory().createEntityManager( PersistenceContextType.EXTENDED); user = entityManager.getReference(EJB30User.class, 1); user.getName(); entityManager.close(); In the line "user = entityManager.getReference(EJB30User.class, 1);" exception throwed: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1] at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27) at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:69) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:102) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:160) at ru.arptek.arpsite.data.user.EJB30User$$EnhancerByCGLIB$$e897190d.getName(<generated>) at ru.arptek.arpsite.data.EntityManagerTest.testSecondLevelCache(EntityManagerTest.java:71) No lines written in database - no sql in log. No INSERT or UPDATE commands.

    Hibernate JIRA | 1 decade ago | Sergey Vladimirov
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1]
  2. 0

    cfg.addAnnotatedClass(EJB30User.class); cfg.setProperty( "hibernate.ejb.classcache." + EJB30User.class.getName(), "read-write"); ... EntityManager entityManager = getEntityManagerFactory() .createEntityManager(PersistenceContextType.EXTENDED); EJB30User user = new EJB30User(); user.setId(1); user.setName("1"); entityManager.persist(user); entityManager.close(); entityManager = getEntityManagerFactory().createEntityManager( PersistenceContextType.EXTENDED); user = entityManager.getReference(EJB30User.class, 1); user.getName(); entityManager.close(); In the line "user = entityManager.getReference(EJB30User.class, 1);" exception throwed: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1] at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27) at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:69) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:102) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:160) at ru.arptek.arpsite.data.user.EJB30User$$EnhancerByCGLIB$$e897190d.getName(<generated>) at ru.arptek.arpsite.data.EntityManagerTest.testSecondLevelCache(EntityManagerTest.java:71) No lines written in database - no sql in log. No INSERT or UPDATE commands.

    Hibernate JIRA | 1 decade ago | Sergey Vladimirov
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1]
  3. 0

    (4h) Deleting a feature that consists of merged transcripts causes error on annotator panel

    GitHub | 2 years ago | cmdcolin
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.bbop.apollo.Feature#11701]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.ObjectNotFoundException

      No row with the given identifier exists: [ru.arptek.arpsite.data.user.EJB30User#1]

      at org.hibernate.ObjectNotFoundException.throwIfNull()
    2. Hibernate
      AbstractLazyInitializer.getImplementation
      1. org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
      2. org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:69)
      3. org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:102)
      3 frames
    3. Hibernate
      CGLIBLazyInitializer.intercept
      1. org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:160)
      1 frame
    4. ru.arptek.arpsite
      EntityManagerTest.testSecondLevelCache
      1. ru.arptek.arpsite.data.user.EJB30User$$EnhancerByCGLIB$$e897190d.getName(<generated>)
      2. ru.arptek.arpsite.data.EntityManagerTest.testSecondLevelCache(EntityManagerTest.java:71)
      2 frames