ConcurrentModificationException « Data Type « JPA Q&A





1. ConcurrentModificationException Set / HashSet ->remove(obj)    forum.hibernate.org

I got the following exception : java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$KeyIterator.next(HashMap.java:828) at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:580) at org.xxxxx.yyyyyy.NetGroupPeerTest.updateGroupP(NetGroupPTest.java:265) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) This error occurs during JUNIT test for a class that uses many-to-many relationship implemented by an association class (table) We are inside the scope of the session under JUNIT framework. Involved code is : @Test public void updateGroupP() { try { Query q ...