-->
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.  [ 2 posts ] 
Author Message
 Post subject: ConcurrentModificationException on batch fetch
PostPosted: Mon Jul 10, 2006 5:52 pm 
Newbie

Joined: Wed Feb 08, 2006 11:53 pm
Posts: 6
I am sporadically getting a ConcurrentModificationException during a 50 user load test. This appears to be happening while a lazy-loaded collection is being batch fetched. Is this supposed to be happening or is this a bug? I would assume, maybe incorrectly, that once the batch fetching started changes to the underlying database would not affect any of the collections Hibernate is working with. Perhaps if the fetch were operating withing a read-only transaction this would not happen?

Hibernate version:
3.2.0.CR2

Mapping documents:
Here is the mapping for the collection:

<set
name="taskCardGroupAssignments"
lazy="true"
inverse="true"
cascade="all-delete-orphan"
sort="unsorted"
batch-size="10"
>

<key
column="TASK_CARD_EXECUTION_ID"
>
</key>

<one-to-many
class="fleetcycle.domain.es.taskCardAssignment.TaskCardGroupAssignment"
/>

</set>


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
Caused by: java.util.ConcurrentModificationException

at org.apache.commons.collections.SequencedHashMap$OrderedIterator.next(SequencedHashMap.java(Compiled Code))

at org.hibernate.util.IdentityMap.entrySet(IdentityMap.java(Compiled Code))

at org.hibernate.engine.BatchFetchQueue.getCollectionBatch(BatchFetchQueue.java(Compiled Code))

at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java(Compiled Code))

at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java(Compiled Code))

at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java(Compiled Code))

at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java(Compiled Code))

at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java(Compiled Code))

at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java(Inlined Compiled Code))

at org.hibernate.collection.PersistentSet.toArray(PersistentSet.java(Inlined Compiled Code))

at sun.reflect.GeneratedMethodAccessor227.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))

at java.lang.reflect.Method.invoke(Method.java(Compiled Code))

... 65 more

Name and version of the database you are using:
Oracle 9i

The generated SQL (show_sql=true):
don't have

Debug level Hibernate log excerpt:
don't have


Top
 Profile  
 
 Post subject: Re: ConcurrentModificationException on batch fetch
PostPosted: Wed Oct 21, 2009 5:14 pm 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
Did you resolve this issue?


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

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.