java.util.ConcurrentModificationException

GitHub | oscargus | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary If a build plan is triggered a multiple times at once, one of the build might fail to start h3. Steps to Reproduce Use the REST API /rest/api/latest/queue/<project>-<plan> to trigger a single builds for 7 times h3. Expected Results The plan will start 7 builds h3. Actual Results One of the build might fail to start. The below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-09-12 09:20:50,659 INFO [http-nio-8086-exec-19] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1954287kb 2016-09-12 09:20:50,820 INFO [http-nio-8086-exec-125] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1941536kb 2016-09-12 09:20:50,843 INFO [http-nio-8086-exec-24] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1939513kb 2016-09-12 09:20:50,846 INFO [http-nio-8086-exec-33] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1939026kb 2016-09-12 09:20:50,847 INFO [http-nio-8086-exec-50] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1938894kb 2016-09-12 09:20:50,847 INFO [http-nio-8086-exec-124] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1938561kb 2016-09-12 09:20:50,847 INFO [http-nio-8086-exec-1] [AccessLogFilter] klfoong POST http://localhost:8085/rest/api/latest/queue/PROJ-PLAN 1938561kb … 2016-09-12 09:20:53,310 INFO [6-DelayedChangeDetectionThread:pool-12-thread-703] [ChainExecutionManagerImpl] Build PROJ-PLAN-JOB1-4151 has been dispatched 2016-09-12 09:20:53,311 INFO [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [BuildQueueManagerImpl] Attempting to queue Project - Plan - Default Job #4151 (PROJ-PLAN-JOB1-4151). 2016-09-12 09:20:53,313 INFO [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [ExecutionPhaseServiceImpl] Project - Plan - Default Job #4151 (PROJ-PLAN-JOB1-4151) queued 2016-09-12 09:20:53,331 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [BuildContextXStreamConverter] Error context: /com.atlassian.bamboo.v2.build.BuildContextImpl/buildDefinition 2016-09-12 09:20:53,332 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [BuildQueueManagerImpl] java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$EntryIterator.next(HashMap.java:1471) at java.util.HashMap$EntryIterator.next(HashMap.java:1469) at com.atlassian.bamboo.utils.ConfigUtils.addMapToConfiguration(ConfigUtils.java:135) at com.atlassian.bamboo.fieldvalue.TaskConfigurationUtils.addTaskDefinitionsToConfig(TaskConfigurationUtils.java:90) at com.atlassian.bamboo.fieldvalue.BuildDefinitionConverter.fromObject(BuildDefinitionConverter.java:91) at com.atlassian.bamboo.serialization.xstream.BuildDefinitionXStreamConverter.marshal(BuildDefinitionXStreamConverter.java:48) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:274) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:250) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.<init>(AbstractReflectionConverter.java:213) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:144) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90) at com.atlassian.bamboo.serialization.xstream.BuildContextXStreamConverter.marshal(BuildContextXStreamConverter.java:46) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1067) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1056) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1029) at com.atlassian.bamboo.v2.build.queue.queues.XStreamQueuePersisterImpl.save(XStreamQueuePersisterImpl.java:54) at com.atlassian.bamboo.v2.build.queue.queues.CommonContextMaps$ForwardingOffloadingCommonContextMap.put(CommonContextMaps.java:144) at com.atlassian.bamboo.v2.build.queue.queues.AbstractQueueOfExecutables.enqueue(AbstractQueueOfExecutables.java:105) at com.atlassian.bamboo.v2.build.queue.BuildQueueManagerImpl$2.doInTransactionWithoutResult(BuildQueueManagerImpl.java:183) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.bamboo.v2.build.queue.BuildQueueManagerImpl.addToQueue(BuildQueueManagerImpl.java:175) at com.atlassian.bamboo.v2.build.queue.BuildTriggeredListener.handleEvent(BuildTriggeredListener.java:33) at sun.reflect.GeneratedMethodAccessor2355.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) 2016-09-12 09:20:53,333 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.v2.build.events.BuildTriggeredEvent[source=com.atlassian.bamboo.build.DefaultBuildExecutionManager@476c830]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.v2.build.queue.BuildTriggeredListener.handleEvent(com.atlassian.bamboo.v2.build.events.BuildTriggeredEvent), listener=com.atlassian.bamboo.v2.build.queue.BuildTriggeredListener@ba2bf2b}] java.lang.RuntimeException: java.util.ConcurrentModificationException at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:50) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$EntryIterator.next(HashMap.java:1471) at java.util.HashMap$EntryIterator.next(HashMap.java:1469) at com.atlassian.bamboo.utils.ConfigUtils.addMapToConfiguration(ConfigUtils.java:135) at com.atlassian.bamboo.fieldvalue.TaskConfigurationUtils.addTaskDefinitionsToConfig(TaskConfigurationUtils.java:90) ... 2016-09-12 09:34:48,085 INFO [scheduler_Worker-3] [OrphanedBuildMonitorJob] PROJ-PLAN-JOB1-4151 marked as Queued but not present in queue since Mon Sep 12 09:21:48 CEST 2016 2016-09-12 09:34:48,086 ERROR [scheduler_Worker-3] [OrphanedBuildMonitorJob] Build PROJ-PLAN-JOB1-4151 had to be cancelled: it was marked as queued but was not present in the queue for (at least) the past 720 seconds. 2016-09-12 09:34:48,086 INFO [scheduler_Worker-3] [DefaultErrorHandler] Recording an error: Build PROJ-PLAN-JOB1-4151 had to be cancelled: it was marked as queued but was not present in the queue for (at least) the past 720 seconds. : PROJ-PLAN-JOB1 2016-09-12 09:34:48,089 INFO [scheduler_Worker-3] [CurrentlyBuildingContainer] removeCurrentlyBuilding called for [PROJ-PLAN-JOB1-4151] 2016-09-12 09:34:48,108 INFO [scheduler_Worker-3] [PlanStatePersisterImpl] Out of order build execution detected for build PROJ-PLAN-JOB1-4151 {noformat} h3.Workaround Delay the POST REST call by one second

    Atlassian JIRA | 7 months ago | Kah Loun Foong [Atlassian]
    java.util.ConcurrentModificationException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. Akshay 4 times, last 7 months ago
  2. poroszd 1 times, last 10 months ago
  3. asvid 4 times, last 11 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.ConcurrentModificationException

    No message provided

    at java.util.HashMap$HashIterator.nextNode()
  2. Java RT
    HashMap$EntryIterator.next
    1. java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
    2. java.util.HashMap$EntryIterator.next(HashMap.java:1471)
    3. java.util.HashMap$EntryIterator.next(HashMap.java:1469)
    3 frames
  3. net.sf.jabref
    EntryEditor$FieldListener.focusLost
    1. net.sf.jabref.gui.entryeditor.EntryEditor.storeSource(EntryEditor.java:812)
    2. net.sf.jabref.gui.entryeditor.EntryEditor.access$16(EntryEditor.java:780)
    3. net.sf.jabref.gui.entryeditor.EntryEditor$StoreFieldAction.actionPerformed(EntryEditor.java:1241)
    4. net.sf.jabref.gui.entryeditor.EntryEditor.updateField(EntryEditor.java:952)
    5. net.sf.jabref.gui.entryeditor.EntryEditor$FieldListener.focusLost(EntryEditor.java:1026)
    5 frames
  4. Java RT
    EventDispatchThread.run
    1. java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:230)
    2. java.awt.Component.processFocusEvent(Component.java:6425)
    3. java.awt.Component.processEvent(Component.java:6289)
    4. java.awt.Container.processEvent(Container.java:2236)
    5. java.awt.Component.dispatchEventImpl(Component.java:4889)
    6. java.awt.Container.dispatchEventImpl(Container.java:2294)
    7. java.awt.Component.dispatchEvent(Component.java:4711)
    8. java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
    9. java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:995)
    10. java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661)
    11. java.awt.Component.dispatchEventImpl(Component.java:4760)
    12. java.awt.Container.dispatchEventImpl(Container.java:2294)
    13. java.awt.Component.dispatchEvent(Component.java:4711)
    14. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    15. java.awt.EventQueue.access$500(EventQueue.java:97)
    16. java.awt.EventQueue$3.run(EventQueue.java:709)
    17. java.awt.EventQueue$3.run(EventQueue.java:703)
    18. java.security.AccessController.doPrivileged(Native Method)
    19. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    20. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    21. java.awt.EventQueue$4.run(EventQueue.java:731)
    22. java.awt.EventQueue$4.run(EventQueue.java:729)
    23. java.security.AccessController.doPrivileged(Native Method)
    24. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    25. java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    26. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    27. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    28. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    29. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    30. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    31. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    31 frames