org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()

Hibernate JIRA | Mark Derricutt | 8 years ago
  1. 0

    We've started to notice the following exceptions being triggered from Hibernate 3.5.0-SNAPSHOT (built locally), but only under certain circumstances (editing a specific user, whilst being logged into the application as a specific user). After stepping through both our application and hibernate through the whole update/commit process being run, I can't find anything that would be causing this problem. During processing, I see calls to org.hibernate.engine.Collections#prepareCollectionForUpdate for CollectionEntry[smx3.schema.PartyRole.agreementsFrom#2006094] (and other elements in the same collection) which is listed in the trace below. The collection which triggers the exception isn't consistently the same one, but seems to be localized to 4-5 different collections, I've also noticed that if I single-stepping through the process, if sometimes completes fine, which may indicate some race conditions somewhere. As I'm not entirely sure why the exception is being thrown, I'm not sure if this is a problem with Hibernate, or something wrong in our application somewhere. Is there anyway I can identify why a collection entry wouldn't have been processed (and what does "processed" actually mean?). 24.04.2009 15:57:33.180 *ERROR* [btpool0-1] org.hibernate.AssertionFailure an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148) at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242) at org.restlet.Filter.handle(Filter.java:197) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) 24.04.2009 15:57:33.183 *WARN* [btpool0-1] atomikos Unexpected error in beforeCompletion: org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148) at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242) at org.restlet.Filter.handle(Filter.java:197) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

    Hibernate JIRA | 8 years ago | Mark Derricutt
    org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()
  2. 0

    We've started to notice the following exceptions being triggered from Hibernate 3.5.0-SNAPSHOT (built locally), but only under certain circumstances (editing a specific user, whilst being logged into the application as a specific user). After stepping through both our application and hibernate through the whole update/commit process being run, I can't find anything that would be causing this problem. During processing, I see calls to org.hibernate.engine.Collections#prepareCollectionForUpdate for CollectionEntry[smx3.schema.PartyRole.agreementsFrom#2006094] (and other elements in the same collection) which is listed in the trace below. The collection which triggers the exception isn't consistently the same one, but seems to be localized to 4-5 different collections, I've also noticed that if I single-stepping through the process, if sometimes completes fine, which may indicate some race conditions somewhere. As I'm not entirely sure why the exception is being thrown, I'm not sure if this is a problem with Hibernate, or something wrong in our application somewhere. Is there anyway I can identify why a collection entry wouldn't have been processed (and what does "processed" actually mean?). 24.04.2009 15:57:33.180 *ERROR* [btpool0-1] org.hibernate.AssertionFailure an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148) at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242) at org.restlet.Filter.handle(Filter.java:197) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) 24.04.2009 15:57:33.183 *WARN* [btpool0-1] atomikos Unexpected error in beforeCompletion: org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148) at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242) at org.restlet.Filter.handle(Filter.java:197) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

    Hibernate JIRA | 8 years ago | Mark Derricutt
    org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()
  3. 0

    I have the following mapping: <class name="A"> <id name="idx"> <generator class="uuid"/> </id> <property name="test"/> <any name="any" id-type="string" meta-type="string" cascade="none"> <column name="any_type"/> <column name="any_id"/> </any> </class> and: <class name="B"> <id name="idx"> <generator class="uuid"/> </id> <set name="as"> <key column="B_as_idx" not-null="false"/> <one-to-many class="A"/> </set> </class> Now I do the following: At first I like to create some objects: Session s = sf.openSession(); Transaction tx = s.beginTransaction(); A a = new A(); Serializable idx = s.save(a); B b = new B(); s.save(b); a.setAny(b); s.update(a); b.getAs().add(a); s.update(b); tx.commit(); s.close(); At next I like to modify A: s = sf.openSession(); tx = s.beginTransaction(); A a2 = (A)s.get(A.class, idx); a2.setTest("hallo!"); s.update(a2); tx.commit(); s.close(); And it crashes at the second commit() with: Exception in thread "main" org.hibernate.AssertionFailure: collection was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:144) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:305) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86) at test.Test.main(Test.java:53) I've attached a testcase, but please change the hibernate.ora.cfg.xml with your parameters.

    Hibernate JIRA | 1 decade ago | Robert Herschke
    org.hibernate.AssertionFailure: collection was not processed by flush()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I have the following mapping: <class name="A"> <id name="idx"> <generator class="uuid"/> </id> <property name="test"/> <any name="any" id-type="string" meta-type="string" cascade="none"> <column name="any_type"/> <column name="any_id"/> </any> </class> and: <class name="B"> <id name="idx"> <generator class="uuid"/> </id> <set name="as"> <key column="B_as_idx" not-null="false"/> <one-to-many class="A"/> </set> </class> Now I do the following: At first I like to create some objects: Session s = sf.openSession(); Transaction tx = s.beginTransaction(); A a = new A(); Serializable idx = s.save(a); B b = new B(); s.save(b); a.setAny(b); s.update(a); b.getAs().add(a); s.update(b); tx.commit(); s.close(); At next I like to modify A: s = sf.openSession(); tx = s.beginTransaction(); A a2 = (A)s.get(A.class, idx); a2.setTest("hallo!"); s.update(a2); tx.commit(); s.close(); And it crashes at the second commit() with: Exception in thread "main" org.hibernate.AssertionFailure: collection was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:144) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:305) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86) at test.Test.main(Test.java:53) I've attached a testcase, but please change the hibernate.ora.cfg.xml with your parameters.

    Hibernate JIRA | 1 decade ago | Robert Herschke
    org.hibernate.AssertionFailure: collection was not processed by flush()
  6. 0

    [1.3.0] When did you plan to release it

    Google Groups | 4 years ago | Alex
    org.hibernate.AssertionFailure: collection [models.User.tags] was not processed by flush()

  1. musketyr 4 times, last 4 weeks ago
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

    collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()

    at org.hibernate.engine.CollectionEntry.postFlush()
  2. Hibernate
    CollectionEntry.postFlush
    1. org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228)
    1 frame
  3. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031)
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369)
    4 frames
  4. Hibernate
    CacheSynchronization.beforeCompletion
    1. org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88)
    1 frame
  5. Transactions JTA
    Sync2Sync.beforeCompletion
    1. com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73)
    1 frame
  6. Transactions Core
    CompositeTerminatorImp.commit
    1. com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253)
    2. com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509)
    3. com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138)
    3 frames
  7. Transactions JTA
    UserTransactionManager.commit
    1. com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297)
    2. com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608)
    3. com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148)
    3 frames
  8. smx3.envers
    TransactionFilter.afterHandle
    1. smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242)
    1 frame
  9. org.restlet
    Filter.doHandle
    1. org.restlet.Filter.handle(Filter.java:197)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    4. org.restlet.Filter.doHandle(Filter.java:150)
    5. org.restlet.Filter.handle(Filter.java:195)
    6. org.restlet.Filter.doHandle(Filter.java:150)
    6 frames
  10. com.noelios.restlet
    StatusFilter.doHandle
    1. com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
    1 frame
  11. org.restlet
    Filter.handle
    1. org.restlet.Filter.handle(Filter.java:195)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    3 frames
  12. com.noelios.restlet
    ApplicationHelper.handle
    1. com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
    2. com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
    2 frames
  13. org.restlet
    Application.handle
    1. org.restlet.Application.handle(Application.java:341)
    1 frame
  14. org.restlet.ext
    WadlApplication.handle
    1. org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705)
    1 frame
  15. org.restlet
    Filter.handle
    1. org.restlet.Filter.doHandle(Filter.java:150)
    2. org.restlet.Filter.handle(Filter.java:195)
    3. org.restlet.Router.handle(Router.java:504)
    4. org.restlet.Filter.doHandle(Filter.java:150)
    5. org.restlet.Filter.handle(Filter.java:195)
    6. org.restlet.Router.handle(Router.java:504)
    7. org.restlet.Filter.doHandle(Filter.java:150)
    8. org.restlet.Filter.handle(Filter.java:195)
    8 frames
  16. com.noelios.restlet
    ChainHelper.handle
    1. com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
    1 frame
  17. org.restlet
    Server.handle
    1. org.restlet.Component.handle(Component.java:673)
    2. org.restlet.Server.handle(Server.java:331)
    2 frames
  18. com.noelios.restlet
    ServerServlet.service
    1. com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
    2. com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
    3. com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
    3 frames
  19. nz.co.smx
    RestActivator$RestActivatorClassLoaderServlet.service
    1. nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182)
    1 frame
  20. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    1 frame
  21. Jetty Server
    ServletHandler.handle
    1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    2 frames
  22. OPS4J Pax Web - Runtime
    HttpServiceServletHandler.handle
    1. org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51)
    1 frame
  23. Jetty Server
    ContextHandler.handle
    1. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    2. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
    2 frames
  24. OPS4J Pax Web - Runtime
    JettyServerHandlerCollection.handle
    1. org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87)
    2. org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63)
    2 frames
  25. Jetty Server
    SocketConnector$Connection.run
    1. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    2. org.mortbay.jetty.Server.handle(Server.java:324)
    3. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    4. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
    5. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
    6. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    7. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    8. org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
    8 frames
  26. Jetty Util
    BoundedThreadPool$PoolThread.run
    1. org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    1 frame