nickvajberg wrote:
I add objects to a set and then tries to iterate it.
A call to
Quote:
iterator.next();
throws this one:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$KeyIterator.next(HashMap.java:818)
at net.sf.hibernate.collection.PersistentCollection$IteratorProxy.next(PersistentCollection.java:441)
I'm using 2.1.2 and lazy sets.
Anyone?
Did you ever find a fix for this problem? I am getting a similar problem attempting to do deletes. My relationship basically looks like this.
GrandParent -> Parent -> Child.
I have cascade="delete-all-orphan" on each collection and inverse="true".
I also have cascade="none" for the "toParent" relationships.
My stack trace looks like this.
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
at java.util.AbstractList$Itr.next(AbstractList.java:417)
at net.sf.hibernate.collection.PersistentCollection$IteratorProxy.next(PersistentCollection.java:441)
at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:482)
at net.sf.hibernate.impl.SessionImpl.doDelete(SessionImpl.java:1209)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1146)