Generally java.util.ConcurrentModificationException will occur when one thread to modify a Collection while another thread is iterating over it. Please check your code with this viewpoint. Below approach can be considered.
 Copy the collection object to be modified
 Modify the collection object inside the synchronized block
What's that smell? I think this tiny ad may have stepped in something.
Create Edit Print & Convert PDF Using Free API with Java