java.lang.NullPointerException

Hibernate JIRA | Nils Probson | 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

    With version 4.1.5 the {{EnversPostUpdateEventListenerImpl.postUpdateDBState}} was introduced. When you lock into the {{org.hibernate.engine.internal.TwoPhaseLoad.addUninitializedEntity(EntityKey, Object, EntityPersister, LockMode, boolean, SessionImplementor)}} method, you'll see that the *loadedState* is set to *NULL*. {noformat:title=Stacktrace} java.lang.NullPointerException at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.postUpdateDBState(EnversPostUpdateEventListenerImpl.java:86) at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.onPostUpdate(EnversPostUpdateEventListenerImpl.java:53) at org.hibernate.action.internal.EntityUpdateAction.postUpdate(EntityUpdateAction.java:255) at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:212) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1214) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:403) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) at ... {noformat}

    Hibernate JIRA | 5 years ago | Nils Probson
    java.lang.NullPointerException
  2. 0

    With version 4.1.5 the {{EnversPostUpdateEventListenerImpl.postUpdateDBState}} was introduced. When you lock into the {{org.hibernate.engine.internal.TwoPhaseLoad.addUninitializedEntity(EntityKey, Object, EntityPersister, LockMode, boolean, SessionImplementor)}} method, you'll see that the *loadedState* is set to *NULL*. {noformat:title=Stacktrace} java.lang.NullPointerException at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.postUpdateDBState(EnversPostUpdateEventListenerImpl.java:86) at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.onPostUpdate(EnversPostUpdateEventListenerImpl.java:53) at org.hibernate.action.internal.EntityUpdateAction.postUpdate(EntityUpdateAction.java:255) at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:212) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1214) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:403) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) at ... {noformat}

    Hibernate JIRA | 5 years ago | Nils Probson
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.postUpdateDBState()
    2. A Hibernate O/RM Module
      EnversPostUpdateEventListenerImpl.onPostUpdate
      1. org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.postUpdateDBState(EnversPostUpdateEventListenerImpl.java:86)
      2. org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.onPostUpdate(EnversPostUpdateEventListenerImpl.java:53)
      2 frames
    3. Hibernate
      RegisteredSynchronization.beforeCompletion
      1. org.hibernate.action.internal.EntityUpdateAction.postUpdate(EntityUpdateAction.java:255)
      2. org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:212)
      3. org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
      4. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
      5. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276)
      6. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
      7. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      8. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1214)
      9. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:403)
      10. org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)
      11. org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
      11 frames