I am getting an ConcurrentmodificationException while iterating over an object that is stored in the Cache.
The Controllercode looks like this:
....
SomeObj o = (SomeObj)Cache.get("obj");
for(listObj lo : o.getGetListObjects()){
if(lo.getName().equals(name)){
o.getEventRecipes().remove(lo);
}
The Execution is getting thrown as soon as the foreach-loop starts. There are no other threads that are explicitly running at the same time.
I am using Playframework 2.1.1 with Java.
Does anyone have an idea how to resolve this?