ConcurrentModificationException in org.jboss.as.cmp.TransactionEntityMap$GlobalTxSynchronization in JBoss EAP 6.0.x

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0

Issue

  • We are seeing this exception when testing our EJB 2 CMP Entity beans:
Caused by: javax.ejb.EJBException: JBAS018688: Exception in store of entity: 710304
    at org.jboss.as.cmp.TransactionEntityMap$GlobalTxSynchronization.synchronize(TransactionEntityMap.java:317) [jboss-as-cmp-7.1.2.Final-redhat-1-JBPAPP-10473-dev.jar:7.1.2.Final-redhat-1]
    at org.jboss.as.cmp.TransactionEntityMap.synchronizeEntities(TransactionEntityMap.java:214) [jboss-as-cmp-7.1.2.Final-redhat-1-JBPAPP-10473-dev.jar:7.1.2.Final-redhat-1]
    at org.jboss.as.cmp.component.CmpEntityBeanComponent.synchronizeEntitiesWithinTransaction(CmpEntityBeanComponent.java:104) [jboss-as-cmp-7.1.2.Final-redhat-1-JBPAPP-10473-dev.jar:7.1.2.Final-redhat-1]
    at org.jboss.as.cmp.component.interceptors.CmpEntityBeanHomeFinderInterceptorFactory.invokeFind(CmpEntityBeanHomeFinderInterceptorFactory.java:69) [jboss-as-cmp-7.1.2.Final-redhat-1-JBPAPP-10473-dev.jar:7.1.2.Final-redhat-1]
    at org.jboss.as.ejb3.component.entity.interceptors.EntityBeanHomeFinderInterceptorFactory$1.processInvocation(EntityBeanHomeFinderInterceptorFactory.java:92) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:201) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
    ... 90 more
Caused by: java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819) [rt.jar:1.7.0_09]
    at java.util.ArrayList$Itr.next(ArrayList.java:791) [rt.jar:1.7.0_09]
    at org.jboss.as.cmp.TransactionEntityMap$GlobalTxSynchronization.synchronize(TransactionEntityMap.java:278) [jboss-as-cmp-7.1.2.Final-redhat-1-JBPAPP-10473-dev.jar:7.1.2.Final-redhat-1]
    ... 96 more

Resolution

Upgrade to JBoss EAP 6.1.0 or request a one off patch

Root Cause

ConcurrentModificationException in org.jboss.as.cmp.TransactionEntityMap$GlobalTxSynchronization instances
https://issues.jboss.org/browse/AS7-6184

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.