java.util.ConcurrentModificationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 25#62807519
    via GitHub by spencergibb
    ,
  • While trying to call {{PropertySourcesPropertyResolver.containsProperty}} from one thread, another thread has added a new {{PropertySource}} and then the {{ConcurrentModificationException}} is thrown. This code in Spring Boot adds the property source in a {{ContextRefreshedEvent}} handler. https://github.com/spring-projects/spring-boot/blob/master/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.java#L228 {noformat} [2014-11-12 15:30:35.201] boot - 93750 ERROR [Thread-3] --- ConcurrentMapConfiguration: Error firing configuration event java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953) at java.util.LinkedList$ListItr.next(LinkedList.java:886) at org.springframework.core.env.PropertySourcesPropertyResolver.containsProperty(PropertySourcesPropertyResolver.java:49) at org.springframework.core.env.AbstractEnvironment.containsProperty(AbstractEnvironment.java:460) at org.springframework.cloud.netflix.archaius.ConfigurableEnvironmentConfiguration.containsKey(ConfigurableEnvironmentConfiguration.java:43) at com.netflix.config.ConcurrentCompositeConfiguration.getSource(ConcurrentCompositeConfiguration.java:864) at com.netflix.config.ConcurrentCompositeConfiguration$1.configurationChanged(ConcurrentCompositeConfiguration.java:151) at com.netflix.config.ConcurrentMapConfiguration.fireEvent(ConcurrentMapConfiguration.java:312) at com.netflix.config.ConcurrentMapConfiguration.setProperty(ConcurrentMapConfiguration.java:216) at com.netflix.config.ConcurrentCompositeConfiguration.setProperty(ConcurrentCompositeConfiguration.java:486) at com.netflix.eureka.cluster.PeerEurekaNode.getBatcher(PeerEurekaNode.java:806) at com.netflix.eureka.cluster.PeerEurekaNode.<init>(PeerEurekaNode.java:94) at com.netflix.eureka.PeerAwareInstanceRegistry.updatePeerEurekaNodes(PeerAwareInstanceRegistry.java:219) at com.netflix.eureka.PeerAwareInstanceRegistry.setupPeerEurekaNodes(PeerAwareInstanceRegistry.java:187) at com.netflix.eureka.PeerAwareInstanceRegistry.init(PeerAwareInstanceRegistry.java:156) at com.netflix.eureka.PeerAwareInstanceRegistry.<init>(PeerAwareInstanceRegistry.java:144) at com.netflix.eureka.PeerAwareInstanceRegistry.<clinit>(PeerAwareInstanceRegistry.java:130) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:174) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:156) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer$$EnhancerBySpringCGLIB$$e403e8f8.onApplicationEvent(<generated>) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1$1.initEurekaEnvironment(EurekaServerInitializerConfiguration.java:109) at com.netflix.eureka.EurekaBootStrap.contextInitialized(EurekaBootStrap.java:88) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1.run(EurekaServerInitializerConfiguration.java:100) at java.lang.Thread.run(Thread.java:744) {noformat}
    via by Spencer Gibb,
  • While trying to call {{PropertySourcesPropertyResolver.containsProperty}} from one thread, another thread has added a new {{PropertySource}} and then the {{ConcurrentModificationException}} is thrown. This code in Spring Boot adds the property source in a {{ContextRefreshedEvent}} handler. https://github.com/spring-projects/spring-boot/blob/master/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.java#L228 {noformat} [2014-11-12 15:30:35.201] boot - 93750 ERROR [Thread-3] --- ConcurrentMapConfiguration: Error firing configuration event java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953) at java.util.LinkedList$ListItr.next(LinkedList.java:886) at org.springframework.core.env.PropertySourcesPropertyResolver.containsProperty(PropertySourcesPropertyResolver.java:49) at org.springframework.core.env.AbstractEnvironment.containsProperty(AbstractEnvironment.java:460) at org.springframework.cloud.netflix.archaius.ConfigurableEnvironmentConfiguration.containsKey(ConfigurableEnvironmentConfiguration.java:43) at com.netflix.config.ConcurrentCompositeConfiguration.getSource(ConcurrentCompositeConfiguration.java:864) at com.netflix.config.ConcurrentCompositeConfiguration$1.configurationChanged(ConcurrentCompositeConfiguration.java:151) at com.netflix.config.ConcurrentMapConfiguration.fireEvent(ConcurrentMapConfiguration.java:312) at com.netflix.config.ConcurrentMapConfiguration.setProperty(ConcurrentMapConfiguration.java:216) at com.netflix.config.ConcurrentCompositeConfiguration.setProperty(ConcurrentCompositeConfiguration.java:486) at com.netflix.eureka.cluster.PeerEurekaNode.getBatcher(PeerEurekaNode.java:806) at com.netflix.eureka.cluster.PeerEurekaNode.<init>(PeerEurekaNode.java:94) at com.netflix.eureka.PeerAwareInstanceRegistry.updatePeerEurekaNodes(PeerAwareInstanceRegistry.java:219) at com.netflix.eureka.PeerAwareInstanceRegistry.setupPeerEurekaNodes(PeerAwareInstanceRegistry.java:187) at com.netflix.eureka.PeerAwareInstanceRegistry.init(PeerAwareInstanceRegistry.java:156) at com.netflix.eureka.PeerAwareInstanceRegistry.<init>(PeerAwareInstanceRegistry.java:144) at com.netflix.eureka.PeerAwareInstanceRegistry.<clinit>(PeerAwareInstanceRegistry.java:130) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:174) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:156) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer$$EnhancerBySpringCGLIB$$e403e8f8.onApplicationEvent(<generated>) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1$1.initEurekaEnvironment(EurekaServerInitializerConfiguration.java:109) at com.netflix.eureka.EurekaBootStrap.contextInitialized(EurekaBootStrap.java:88) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1.run(EurekaServerInitializerConfiguration.java:100) at java.lang.Thread.run(Thread.java:744) {noformat}
    via by Spencer Gibb,
  • Edge reversing on directed graph
    via Stack Overflow by Fabio Carello
    ,
    • java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953) at java.util.LinkedList$ListItr.next(LinkedList.java:886) at org.springframework.core.env.PropertySourcesPropertyResolver.containsProperty(PropertySourcesPropertyResolver.java:49) at org.springframework.core.env.AbstractEnvironment.containsProperty(AbstractEnvironment.java:460) at org.springframework.cloud.netflix.archaius.ConfigurableEnvironmentConfiguration.containsKey(ConfigurableEnvironmentConfiguration.java:43) at com.netflix.config.ConcurrentCompositeConfiguration.getSource(ConcurrentCompositeConfiguration.java:864) at com.netflix.config.ConcurrentCompositeConfiguration$1.configurationChanged(ConcurrentCompositeConfiguration.java:151) at com.netflix.config.ConcurrentMapConfiguration.fireEvent(ConcurrentMapConfiguration.java:312) at com.netflix.config.ConcurrentMapConfiguration.setProperty(ConcurrentMapConfiguration.java:216) at com.netflix.config.ConcurrentCompositeConfiguration.setProperty(ConcurrentCompositeConfiguration.java:486) at com.netflix.eureka.cluster.PeerEurekaNode.getBatcher(PeerEurekaNode.java:806) at com.netflix.eureka.cluster.PeerEurekaNode.<init>(PeerEurekaNode.java:94) at com.netflix.eureka.PeerAwareInstanceRegistry.updatePeerEurekaNodes(PeerAwareInstanceRegistry.java:219) at com.netflix.eureka.PeerAwareInstanceRegistry.setupPeerEurekaNodes(PeerAwareInstanceRegistry.java:187) at com.netflix.eureka.PeerAwareInstanceRegistry.init(PeerAwareInstanceRegistry.java:156) at com.netflix.eureka.PeerAwareInstanceRegistry.<init>(PeerAwareInstanceRegistry.java:144) at com.netflix.eureka.PeerAwareInstanceRegistry.<clinit>(PeerAwareInstanceRegistry.java:130) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:174) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer.onApplicationEvent(EurekaServerInitializerConfiguration.java:156) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$RegistryInstanceProxyInitializer$$EnhancerBySpringCGLIB$$e403e8f8.onApplicationEvent(<generated>) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1$1.initEurekaEnvironment(EurekaServerInitializerConfiguration.java:109) at com.netflix.eureka.EurekaBootStrap.contextInitialized(EurekaBootStrap.java:88) at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1.run(EurekaServerInitializerConfiguration.java:100) at java.lang.Thread.run(Thread.java:744)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Hronom
    7 times, last one,
    osvzs
    1 times, last one,
    tvrmsmith
    1 times, last one,
    1 more bugmates