Skip to content

Concurrency Exception during bean configuration related to not thread safe getBeanPostProcessor access [SPR-17286] #21819

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sebastien Fuchs opened SPR-17286 and commented

Happens during initialisation of projects using Akka actors enriched by Spring beans ex:

Spring service -> akka actor created and autowired during postConstruct.

Log:

[INFO] F8: Caused by: java.util.ConcurrentModificationException: null
[INFO] F8: 	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
[INFO] F8: 	at java.util.ArrayList$Itr.next(ArrayList.java:859)
[INFO] F8: 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:614)
[INFO] F8: 	at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:555)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:389)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1002)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:345)
[INFO] F8: 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)
[INFO] F8: 	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1092)
[INFO] F8: 	at com.asaoweb.exmessaging.server.actors.SpringActorProducer.produce(SpringActorProducer.java:36)
[INFO] F8: 	at akka.actor.Props.newActor(Props.scala:212)
[INFO] F8: 	at akka.actor.ActorCell.newActor(ActorCell.scala:624)
[INFO] F8: 	at akka.actor.ActorCell.create(ActorCell.scala:650)

 


Affects: 4.3.19

Issue Links:

Referenced from: commits d15abfd, fa06faa, 1756f83, 0d1bf52, 4642c32

Backported to: 5.0.10

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions