You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Lee Breisacher <LB...@seagullsw.com> on 2003/02/28 18:31:59 UTC

CursorableLinkedList ConcurrentModificationException

I just ran into this error:

java.util.ConcurrentModificationException
 	at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
 	at java.util.AbstractList$Itr.next(AbstractList.java:421)
	at
org.apache.commons.collections.CursorableLinkedList.broadcastListableInserte
d(Unknown Source)
 	at
org.apache.commons.collections.CursorableLinkedList.insertListable(Unknown
Source)
 	at
org.apache.commons.collections.CursorableLinkedList.addFirst(Unknown Source)
 	at
org.apache.commons.pool.impl.GenericObjectPool.returnObject(Unknown Source)

Unfortunately, I do not have stack traces for the other threads that were
running, so I don't know what some other thread must have been doing to
cause this. But, looking at GenericObjectPool, it appears to be properly
synchronized at all the places that operate on the CursorableLinkedList (its
_pool variable), so I don't quite understand how this error can occur.
Anyway, does this look like a bug in CursorableLinkedList?  Has anyone seen
this before and know of a fix/workaround?

Thanks,

Lee

Re: CursorableLinkedList ConcurrentModificationException

Posted by Rodney Waldhoff <rw...@apache.org>.
By "recent nightly build", I mean of both commons-pool and commons-dbcp,
by the way.

On Mon, 3 Mar 2003, Rodney Waldhoff wrote:

> If I remember correctly, there was once a bug along these lines triggered
> by certain evictions of the prepared statement pool that was addressed in
> either the pool or dbcp component.  Looking through the cvs logs quickly I
> wasn't able to see it, but you may want to give a recent nightly build a
> try.
>

Re: CursorableLinkedList ConcurrentModificationException

Posted by Rodney Waldhoff <rw...@apache.org>.
If I remember correctly, there was once a bug along these lines triggered
by certain evictions of the prepared statement pool that was addressed in
either the pool or dbcp component.  Looking through the cvs logs quickly I
wasn't able to see it, but you may want to give a recent nightly build a
try.

On Fri, 28 Feb 2003, Lee Breisacher wrote:

> I just ran into this error:
>
> java.util.ConcurrentModificationException
>  	at
> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
>  	at java.util.AbstractList$Itr.next(AbstractList.java:421)
> 	at
> org.apache.commons.collections.CursorableLinkedList.broadcastListableInserte
> d(Unknown Source)
>  	at
> org.apache.commons.collections.CursorableLinkedList.insertListable(Unknown
> Source)
>  	at
> org.apache.commons.collections.CursorableLinkedList.addFirst(Unknown Source)
>  	at
> org.apache.commons.pool.impl.GenericObjectPool.returnObject(Unknown Source)
>
> Unfortunately, I do not have stack traces for the other threads that were
> running, so I don't know what some other thread must have been doing to
> cause this. But, looking at GenericObjectPool, it appears to be properly
> synchronized at all the places that operate on the CursorableLinkedList (its
> _pool variable), so I don't quite understand how this error can occur.
> Anyway, does this look like a bug in CursorableLinkedList?  Has anyone seen
> this before and know of a fix/workaround?
>
> Thanks,
>
> Lee
>