Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13213

ConcurrentModificationException when doing a merge on AbstractEnvironment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.8
    • Fix Version/s: 3.2.15, 4.1.8, 4.2.2
    • Component/s: None
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I seem to get an occasional ConcurrentModificationException when doing a merge on various different threads. Perhaps merge() needs to be synchronized?

      Caused by: java.util.ConcurrentModificationException
              at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
              at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384)
              at java.util.AbstractCollection.toArray(AbstractCollection.java:171)
              at org.springframework.util.StringUtils.toStringArray(StringUtils.java:816)
              at org.springframework.core.env.AbstractEnvironment.getDefaultProfiles(AbstractEnvironment.java:268)
              at org.springframework.core.env.AbstractEnvironment.merge(AbstractEnvironment.java:437)
              at org.springframework.context.support.AbstractApplicationContext.setParent(AbstractApplicationContext.java:402)
              at org.springframework.context.support.GenericApplicationContext.setParent(GenericApplicationContext.java:148)
              at org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder.createFlowApplicationContext(FlowModelFlowBuilder.java:336)
              at org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder.initLocalFlowContext(FlowModelFlowBuilder.java:302)
              at org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder.doInit(FlowModelFlowBuilder.java:147)
              at org.springframework.webflow.engine.builder.support.AbstractFlowBuilder.init(AbstractFlowBuilder.java:46)
              at org.springframework.webflow.engine.builder.FlowAssembler.assembleFlow(FlowAssembler.java:90)
              at org.springframework.webflow.engine.builder.DefaultFlowHolder.assembleFlow(DefaultFlowHolder.java:109)
              at org.springframework.webflow.engine.builder.DefaultFlowHolder.getFlowDefinition(DefaultFlowHolder.java:84)
              at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61)
              at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:138)
              at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)
              at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)
              at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
              ... 227 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              stephenliang Stephen Liang
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 31 weeks, 2 days ago