org.hibernate.AssertionFailure: dirty, but no dirty properties

Hibernate JIRA | Michał Borowiecki | 1 decade ago
  1. 0

    This exception is raised in the following scenario: 1. An entity is returned from a find operation. 2. It is modified. 3. EntityManager.merge is called on it. 4. In the PreUpdate callback the bean has its fields modified to the values they had before step 2. 5. The DefaultFlushEntityEventListener determines that all the fields have their values equal to those in the cache and raises the error: org.hibernate.AssertionFailure: dirty, but no dirty properties at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:256) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:121) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:988) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:337) at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:473) This bug is probably a reincarnation of EJB-29, however that report did not have a comprehensive description so I decided to create a new one.

    Hibernate JIRA | 1 decade ago | Michał Borowiecki
    org.hibernate.AssertionFailure: dirty, but no dirty properties
  2. 0

    This exception is raised in the following scenario: 1. An entity is returned from a find operation. 2. It is modified. 3. EntityManager.merge is called on it. 4. In the PreUpdate callback the bean has its fields modified to the values they had before step 2. 5. The DefaultFlushEntityEventListener determines that all the fields have their values equal to those in the cache and raises the error: org.hibernate.AssertionFailure: dirty, but no dirty properties at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:256) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:121) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:988) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:337) at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:473) This bug is probably a reincarnation of EJB-29, however that report did not have a comprehensive description so I decided to create a new one.

    Hibernate JIRA | 1 decade ago | Michał Borowiecki
    org.hibernate.AssertionFailure: dirty, but no dirty properties
  3. 0

    org.hibernate.exception.JDBCConnectionException: could not insert, How To Find the problem in a production enviroment

    Stack Overflow | 5 years ago | plweb.se
    org.hibernate.AssertionFailure: null id in sherlock.common.dao.BatchLog entry (don't flush the Session after an exception occurs)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.hibernate.AssertionFailure

    Stack Overflow | 5 years ago | sesmic
    org.hibernate.AssertionFailure: null id in com.inrev.bm.bean.IRKeyWordTweet entry (don't flush the Session after an exception occurs) at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
  6. 0

    JDBCExceptionReporter [ERROR] Field 'id' doesn't have a default value

    Stack Overflow | 4 years ago | forhas
    org.hibernate.AssertionFailure: null id in me.comocomo.server.dao.objectModel.club.register.BrandManager entry (don't flush the Session after an exception occurs)

    1 unregistered visitors
    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. org.hibernate.AssertionFailure

      dirty, but no dirty properties

      at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate()
    2. Hibernate
      SessionImpl.managedFlush
      1. org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:256)
      2. org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:121)
      3. org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
      4. org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
      5. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
      6. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:988)
      7. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:337)
      7 frames
    3. Hibernate EJB
      AbstractEntityManagerImpl$1.beforeCompletion
      1. org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:473)
      1 frame