-->
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: collection was processed twice by flush()
PostPosted: Tue Mar 29, 2005 4:36 pm 
Newbie

Joined: Thu Jun 03, 2004 8:57 am
Posts: 8
I am getting this error:

(net.sf.hibernate.AssertionFailure.<init>(AssertionFailure.java:22)) an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)

net.sf.hibernate.AssertionFailure: collection was processed twice by flush()

the error repeats infinately...(until stack overflow) and maxes out my databases cpu at 100%. I is the root cause of the issue I posted last week
http://forum.hibernate.org/viewtopic.php?t=940440

what shoudl I be looking for....what types of situation would cause a colleciton to be processed twice by flush?

Paul


Hibernate version:
2.1.7
Mapping documents:

Code between sessionFactory.openSession() and session.close():
Session session = HibernateUtil.currentSession();
Transaction trx = session.beginTransaction();
Query query = session.createQuery(sb.toString());
query.setParameter("catNum", catNum);
query.setMaxResults(1);
list = query.list();
trx.commit();
Full stack trace of any exception that occurs:
ERROR[2005-03-29 14:19:59,749](net.sf.hibernate.AssertionFailure.<init>(AssertionFailure.java:22)) an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
net.sf.hibernate.AssertionFailure: collection was processed twice by flush()
at net.sf.hibernate.impl.SessionImpl.prepareCollectionForUpdate(SessionImpl.java:2957)
at net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImpl.java:2946)
at net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2808)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2281)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1814)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1577)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1542)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.crosslink.biz.inventory.InventoryItemBin.get(InventoryItemBin.java:146)
at com.crosslink.biz.cases.CaseUsageExternalItem.getInventoryItem(CaseUsageExternalItem.java:150)
at com.crosslink.biz.cases.CaseUsageExternalItem.getListPrice(CaseUsageExternalItem.java:134)
at com.crosslink.biz.cases.CaseUsageExternalItem.getPrice(CaseUsageExternalItem.java:179)
at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

///the block from this point to the end repeats until stack overflow
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96)
at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:254)
at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2494)
at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2478)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2280)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1814)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1577)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1542)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.crosslink.biz.inventory.InventoryItemBin.get(InventoryItemBin.java:146)
at com.crosslink.biz.cases.CaseUsageExternalItem.getInventoryItem(CaseUsageExternalItem.java:150)
at com.crosslink.biz.cases.CaseUsageExternalItem.getListPrice(CaseUsageExternalItem.java:134)
at com.crosslink.biz.cases.CaseUsageExternalItem.getPrice(CaseUsageExternalItem.java:179)
at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
///end block repeating until stack overflow
Name and version of the database you are using:
SQL Server 2000
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.