-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: AssertionFailure: collectionwas not processed by flush() ???
PostPosted: Fri Oct 02, 2009 10:39 pm 
Regular
Regular

Joined: Tue May 12, 2009 6:08 am
Posts: 92
I get this error every now and again.. and I have no clue what it means.

Code:
ERROR AssertionFailure:45 - 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 [myproject.domain.Category.children] 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:1028)
   at jawbs.DatabaseTests.flush(DatabaseTests.java:113)


This occurs when saving a parent object (not a category) that contains a list of categories... and each category contains a list of children categories.

What seems to fix the problem is executing the following code before I execute the saveOrUpdate/flush:

parentObject.getCategories();

I don't really understand why I get this error message. I get it in other cases as well. It doesn't happen too often, but I need to flush after a saveOrUpdate() when I test. There is no way around it. Why is this happening?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.