I\'m using an iterator to loop over a collection as follows:
Iterator entityItr = entityList.iterator();
while (entityItr.hasNext())
{
It looks that there is another thread using the same collection and modifing it when this code is iterating over the collection.
ConcurrentModificationException
You can use navite java concurrent collestions instead. They are thread safe. However it's a good habbit to create immutable collections - they are thread safe and enforce you to design reliable code.