java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Ranie Jade Ramiso,
  • 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.
    via by Ranie Jade Ramiso,
    • 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)
    No Bugmate found.