org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myChild' defined in class MyConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public MyChild MyConfiguration.myChild()] threw exception; nested exception is java.util.ConcurrentModificationException

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via javacodegeeks.com by Unknown author

Causes : The Collection is internally modified, while a thread is iterating over it. OR after the creation of an iterator, the Collection is internally modified by any method other than the iterator’s own methods for removal and addition.

,
via oracle.com by Unknown author

In order to avoid more than one threads accessing or modifying the same object, you can synchronize them over the object, in order to allow only one thread to manipulate it over the time

Solutions on the web

via Spring JIRA by James Shaw, 1 year ago
Error creating bean with name 'myChild' defined in class MyConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public MyChild MyConfiguration.myChild()] threw exception; nested exception is java.util.ConcurrentModificationException
via Spring JIRA by James Shaw, 1 year ago
Error creating bean with name 'myChild' defined in class MyConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public MyChild MyConfiguration.myChild()] threw exception; nested exception is java.util.ConcurrentModificationException
via freebsd.org by Unknown author, 2 years ago
Error creating bean with name 'int' defined in class com.ubnt.oOOO.new: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.ubnt.oOOO.D.D com.ubnt.oOOO.new.int
via GitHub by anon12345
, 1 month ago
Error creating bean with name '?00000' defined in class com.ubnt.service.AppContext: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.oO0O.D
via GitHub by spring-issuemaster
, 1 year ago
Error creating bean with name 'springSecurityFilterChain' defined in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration: Instantiation of bean failed; nested exception is
via Spring JIRA by Stepan Koltsov, 1 year ago
Error creating bean with name 'lamp' defined in class ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myChild' defined in class MyConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public MyChild MyConfiguration.myChild()] threw exception; nested exception is java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
at java.util.ArrayList$Itr.next(ArrayList.java:791)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:587)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:904)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.factoryContainsBean(ConfigurationClassEnhancer.java:323)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1031)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:927)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at undefined.Test$1.run(Test.java:15)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Users with the same issue

10 times, 1 week ago
Once, 4 weeks ago
Samebug visitor profile picture
Unknown user
2 times, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.