=====
Junit test/jetty server
Eclipselink 2.5.2.v20140319-9ad6abd
Spring 3.1.3
Problem
======
We are trying to migrate from Eclipselink 2.4.0 to 2.5.2 and when we switch the versions in the pom we are getting the following ConcurrentModificationException
Exception Description: Predeployment of PersistenceUnit [ABCPersistenceUnit] failed.
Internal Exception: java.util.ConcurrentModificationException
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:230)
... 68 more
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
at java.util.HashMap$ValueIterator.next(HashMap.java:954)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage1(MetadataProject.java:1761)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:575)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:585)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1869)
The pertinent parts are as follows
<bean id="appPUM" class="com.blah.blah.MergingPersistenceUnitManager">
<property name="persistenceXmlLocations">
<list>
<value>classpath*:META-INF/file1-persistence.xml</value>
<value>classpath*:META-INF/file2-eclipse.xml</value>
<value>classpath*:META-INF/file3-tpersistence.xml</value>
</list>
</property>
<property name="defaultDataSource" ref=<dataSource>/>
</bean>
<bean id="abcemfactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" depends-on="liquibase" lazy-init="true">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitManager" ref=" appPUM " />
<property name="jpaDialect" ref="eclipseLinkDialect" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
<property name="jpaPropertyMap">
<map>
<entry key="eclipselink.jdbc.native-sql" value="false"/>
<entry key="eclipselink.weaving" value="false"/>
<entry key="eclipselink.cache.shared.default" value="false"/>
<entry key="eclipselink.logging.level" value="FINE"/>
<entry key="eclipselink.logging.parameters" value="true"/>
<entry key="eclipselink.logging.exceptions" value="true"/>
<entry key="eclipselink.orm.throw.exceptions" value="true"/>
<entry key="eclipselink.jdbc.batch-writing" value="${persistence.batchWriting}"/>
<entry key="eclipselink.order-updates" value="true"/>
</map>
</property>
</bean>
Switching back to 2.4 the exception goes away
1. Has there been any changes between 2.4 to 2.5.2 that would cause this issue?
2.It appears to be in the predeploy of the persistence unit of the EntityManagerSetup for 2.5.2. Has something changed
in it that we should change when migrating ?
Thx in advance
Vaidya