Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Migration failures from el 2.4 to 2.5.2..

This is a bug, throwing a random java.util.ConcurrentModificationException is never valid. Please open a bug report and note the important bits necessary to recreate the error.

On Mon, Sep 29, 2014 at 5:29 PM, vaidya nathan <vaidyaatdst@xxxxxxxxx> wrote:
Can someone acknowledge that this is a bug that needs to be fixed - atleast to give better messages in the preprocessing logic that has changed between 2.4 and 2.5 


On Tuesday, September 23, 2014, vaidya nathan <vaidyaatdst@xxxxxxxxx> wrote:

Found the problem.

We were missing one of the embeddables in the persistence xml file . Lets say we have the following classes. Consider

@Embeddable

public class Foo

{

  @Embedded

  private Bar bar;

  public Bar getBar()

  {

     return bar;

  }

}

 

in our persistence.xml file we forgot to add the class Bar, so when it was processing Foo it was giving the java.util.ConcurrentModification exception. On further debugging found the following 

In 2.4.0 we have the file called org.eclipse.persistence.internal.jpa.metadata.MetadataProject.java and it just had 2 steps - entity accessors, root embeddable accessors .

In 2.5.2 we have the same file that has 4 steps -> entity accessors, root embeddable accessors,converter accessors  and embeddable accessors ,

 

The final embeddable accessors was where it failed. I believe that eclipselink should give a proper error message stating that it’s not able to reference the embedded class instead of the very generic java.util exception.

 

Thx

Vaidya


Please consider the environment before printing this email and any attachments.

This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system.


On Tuesday, September 23, 2014, Rick Curtis <curtisr7@xxxxxxxxx> wrote:
This smells like a bug. Can you put together some sort of a small test that recreates the problem?

Thanks,
RIck

On Tue, Sep 23, 2014 at 8:45 AM, vaidya nathan <vaidyaatdst@xxxxxxxxx> wrote:
Any updates on this ? 


On Monday, September 22, 2014, vaidya nathan <vaidyaatdst@xxxxxxxxx> wrote:
Hello el users,

Setup

=====

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


Please consider the environment before printing this email and any attachments.


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Rick Curtis

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Rick Curtis

Back to the top