We're using Hibernate 5.1.0.Final and we've received this exception. We also received it in Hibernate 4.3.6, but after reading this issue, we decided to update to Hibernate 5, hopefully fixing the exception. But unfortunately, the issue still remains. This is top of the stacktrace: java.lang.NullPointerException at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:138) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:74) at org.hibernate.event.internal.DefaultDirtyCheckEventListener.onDirtyCheck(DefaultDirtyCheckEventListener.java:35) at org.hibernate.internal.SessionImpl.isDirty(SessionImpl.java:1280) at nl.gvb.spot.persistence.AbstractSingletonSession.commitTransaction(AbstractSingletonSession.java:55) So, it happens at the isDirty check on a Session. We're using Hibernate 5.1.0, with a MariaDB database, Java 1.8 in an OSGi environment, running in Karaf 4.0.4. |