java.lang.NullPointerException

Spring JIRA | shyam | 4 months ago
  1. 0

    {noformat} java.lang.NullPointerException at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:225) at org.hibernate.type.ComponentType.compare(ComponentType.java:226) at org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:171) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:225) at org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:299) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160) at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:965) at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:909) at org.hibernate.engine.spi.CascadingActions$1.cascade(CascadingActions.java:74) at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:350) at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:293) at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161) at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:379) at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:319) at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:296) at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161) at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:118) at org.hibernate.event.internal.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:353) at org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:275) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:73) at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:956) at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:896) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:1214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {noformat}

    Spring JIRA | 4 months ago | shyam
    java.lang.NullPointerException
  2. 0

    If in composite-id is a field of type byte[] then removing more than one entity throws NullPointerException. it doesnt work on Hibernate 4.3.0.Final, It worked on Hibernate 4.2.8.Final. EntityManagerFactory emf = Persistence.createEntityManagerFactory("jpaDemo"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx.begin(); Query query = em.createQuery("select s from MyEntity s"); List l = query.getResultList();//returns 3 objects em.remove(l.get(0)); em.remove(l.get(1));//throws exception java.lang.NullPointerException at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:221) at org.hibernate.type.ComponentType.compare(ComponentType.java:230) at org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:171) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:219) at org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:299) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:73) at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:916) at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:892) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:1214) at hibernatetest.Main.test(Main.java:23) at hibernatetest.Main.main(Main.java:9)

    Hibernate JIRA | 3 years ago | Grzegorz Wieczorek
    java.lang.NullPointerException
  3. 0

    If in composite-id is a field of type byte[] then removing more than one entity throws NullPointerException. it doesnt work on Hibernate 4.3.0.Final, It worked on Hibernate 4.2.8.Final. EntityManagerFactory emf = Persistence.createEntityManagerFactory("jpaDemo"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx.begin(); Query query = em.createQuery("select s from MyEntity s"); List l = query.getResultList();//returns 3 objects em.remove(l.get(0)); em.remove(l.get(1));//throws exception java.lang.NullPointerException at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:221) at org.hibernate.type.ComponentType.compare(ComponentType.java:230) at org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:171) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:219) at org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:299) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160) at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:73) at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:916) at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:892) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:1214) at hibernatetest.Main.test(Main.java:23) at hibernatetest.Main.main(Main.java:9)

    Hibernate JIRA | 3 years ago | Grzegorz Wieczorek
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.type.AbstractStandardBasicType.compare()
    2. Hibernate
      SessionImpl.delete
      1. org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:225)
      2. org.hibernate.type.ComponentType.compare(ComponentType.java:226)
      3. org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:171)
      4. org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222)
      5. org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:225)
      6. org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:299)
      7. org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160)
      8. org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:965)
      9. org.hibernate.internal.SessionImpl.delete(SessionImpl.java:909)
      10. org.hibernate.engine.spi.CascadingActions$1.cascade(CascadingActions.java:74)
      11. org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:350)
      12. org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:293)
      13. org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161)
      14. org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:379)
      15. org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:319)
      16. org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:296)
      17. org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161)
      18. org.hibernate.engine.internal.Cascade.cascade(Cascade.java:118)
      19. org.hibernate.event.internal.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:353)
      20. org.hibernate.event.internal.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:275)
      21. org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:160)
      22. org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:73)
      23. org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:956)
      24. org.hibernate.internal.SessionImpl.delete(SessionImpl.java:896)
      24 frames
    3. org.hibernate.jpa
      AbstractEntityManagerImpl.remove
      1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:1214)
      1 frame
    4. Java RT
      NativeMethodAccessorImpl.invoke0
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      1 frame