Hi there,
I searched the forum for a similar issue and i found many topics about ConcurrentModificationExceptions, but haven't found anything related. So I make up a new topic on our problem using hibernate. We get this exception not every time, it happens after updating about 50k entities and cannot exactly be reproduced.
The stacktrace shows an Exception deep inside hibernate and I hope there is anybody who can tell me something we can do in this case.
We use Hibernate Version 3.2.7 without 2nd level cache and annotations, configured by hbm.xml files. Java Runtime is 1.6.0 Update 10.
Code:
java.util.ConcurrentModificationException
at org.apache.commons.collections.ReferenceMap$EntryIterator.checkMod(Unknown Source)
at org.apache.commons.collections.ReferenceMap$EntryIterator.hasNext(Unknown Source)
at java.util.AbstractMap.containsValue(Unknown Source)
at org.hibernate.engine.StatefulPersistenceContext.containsProxy(StatefulPersistenceContext.java:467)
at org.hibernate.proxy.AbstractLazyInitializer.isConnectedToSession(AbstractLazyInitializer.java:141)
at org.hibernate.proxy.AbstractLazyInitializer.setSession(AbstractLazyInitializer.java:85)
at org.hibernate.engine.StatefulPersistenceContext.reassociateProxy(StatefulPersistenceContext.java:525)
at org.hibernate.engine.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:485)
at org.hibernate.event.def.ProxyVisitor.processEntity(ProxyVisitor.java:27)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:104)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:123)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:293)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223)
at org.hibernate.event.def.DefaultUpdateEventListener.performSaveOrUpdate(DefaultUpdateEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireUpdate(SessionImpl.java:565)
at org.hibernate.impl.SessionImpl.update(SessionImpl.java:553)
at org.hibernate.impl.SessionImpl.update(SessionImpl.java:545)
at com.desoft.std.dao.hibernate.BaseHibernateDAO$1.execute(BaseHibernateDAO.java:87)
I can post more information on this topic by demand, feel free to ask!
Thanks in advance,
Florian Probst