This usually happens when you modify the structure (i.e. remove(), add(), etc.) of a 
Collection that an Iterator was created from during iteration over that Iterator. 

In fact you can see this in the stack trace:

java.util.AbstractList$Itr.checkForComodification threw the concurrent modification 
exception because something did indeed change in the parent Collection.

hth,
Scott

> -----Original Message-----
> From: Efftinge, Sven [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 7:42 AM
> To: 'OJB Users List'
> Subject: Dlist.add()
> 
> Hello,
> is it possible to add a new Object adresse to a Dlist adresses wich I got
> by
> calling Person.getAdresses() ?
> 
>       tx.begin();
>       // retrieving a Person object Person p
>       Collection adresses = p.getAdresses();
>       Adresse a = new Adresse();
>       // a.setBlaBLa(...);
>       a.setPerson(p);
>       adresses.add(a);
>       Iterator iter = col.iterator();
>       while (iter.hasNext()) {
>               tx.lock(iter.next(), tx.WRITE);
>       }
>       tx.commit();
> 
> My application says:
> java.util.ConcurrentModificationException
>       at
> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
>       at java.util.AbstractList$Itr.next(AbstractList.java:417)
>       at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
>       at org.apache.ojb.odmg.TransactionImpl.doCommit(Unknown Source)
>       at org.apache.ojb.odmg.TransactionImpl.checkpoint(Unknown Source)
> 
> Sven
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to