java.lang.NullPointerException

Spring JIRA | Ranie Jade Ramiso | 4 years ago
  1. 0

    NPE is caused when _AuditingHandler_ is *null* on _AuditingEntityListener_. {noformat} ------------------------------------------------------------------------------- Test set: org.springframework.data.jpa.repository.NamespaceUserRepositoryTests ------------------------------------------------------------------------------- Tests run: 74, Failures: 0, Errors: 67, Skipped: 1, Time elapsed: 1.943 sec <<< FAILURE! deleteAll(org.springframework.data.jpa.repository.NamespaceUserRepositoryTests) Time elapsed: 0.033 sec <<< ERROR! java.lang.NullPointerException at org.springframework.data.jpa.domain.support.AuditingEntityListener.touchForCreate(AuditingEntityListener.java:67) 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:597) at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:45) at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:94) at org.hibernate.ejb.event.EntityCallbackHandler.preCreate(EntityCallbackHandler.java:63) at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:68) at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:201) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:147) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:71) at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808) at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782) at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786) at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:839) 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:597) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240) at $Proxy35.persist(Unknown Source) {noformat} It's not the only test that fails.

    Spring JIRA | 4 years ago | Ranie Jade Ramiso
    java.lang.NullPointerException
  2. 0

    NPE is caused when _AuditingHandler_ is *null* on _AuditingEntityListener_. {noformat} ------------------------------------------------------------------------------- Test set: org.springframework.data.jpa.repository.NamespaceUserRepositoryTests ------------------------------------------------------------------------------- Tests run: 74, Failures: 0, Errors: 67, Skipped: 1, Time elapsed: 1.943 sec <<< FAILURE! deleteAll(org.springframework.data.jpa.repository.NamespaceUserRepositoryTests) Time elapsed: 0.033 sec <<< ERROR! java.lang.NullPointerException at org.springframework.data.jpa.domain.support.AuditingEntityListener.touchForCreate(AuditingEntityListener.java:67) 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:597) at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:45) at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:94) at org.hibernate.ejb.event.EntityCallbackHandler.preCreate(EntityCallbackHandler.java:63) at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:68) at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:201) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:147) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:71) at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808) at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782) at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786) at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:839) 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:597) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240) at $Proxy35.persist(Unknown Source) {noformat} It's not the only test that fails.

    Spring JIRA | 4 years ago | Ranie Jade Ramiso
    java.lang.NullPointerException
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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.springframework.data.jpa.domain.support.AuditingEntityListener.touchForCreate()
    2. Spring Data JPA
      AuditingEntityListener.touchForCreate
      1. org.springframework.data.jpa.domain.support.AuditingEntityListener.touchForCreate(AuditingEntityListener.java:67)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Hibernate EJB
      EJB3PersistEventListener.saveWithGeneratedId
      1. org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:45)
      2. org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:94)
      3. org.hibernate.ejb.event.EntityCallbackHandler.preCreate(EntityCallbackHandler.java:63)
      4. org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:68)
      4 frames
    5. Hibernate
      SessionImpl.persist
      1. org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:201)
      2. org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:147)
      3. org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:71)
      4. org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808)
      5. org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782)
      6. org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786)
      6 frames
    6. Hibernate EJB
      AbstractEntityManagerImpl.persist
      1. org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:839)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    8. Spring ORM
      SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
      1. org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
      1 frame
    9. Unknown
      $Proxy35.persist
      1. $Proxy35.persist(Unknown Source)
      1 frame