new app .ear with JPA 2.0 provider=eclipseLink deployed to WLS 10.3.1
872988 Jul 4, 2011 3:29 AMHi,
We want to deploy a new app .ear to a WLS 10.3.1 instance with JPA 2.0 provider=eclispeLink (so that it can use the new javax.persistence.metamodel package API). We want to do this in a way that assures that the new app .ear deployment in no way impacts any other app .ear deployment using JPA 1.0 on that same WLS 10.3.1 instance.
We have basically covered all the steps documented under "alternative 3" on the EclipseLink wiki page addressing this issue (see [http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#20110115:_JPA_2.0_using_EclipseLink_on_WebLogic_10.3.4.0|http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#20110115:_JPA_2.0_using_EclipseLink_on_WebLogic_10.3.4.0] )
Because we could not get past the verison=2.0 XSD validation issue on deployment, our app's persistence.xml uses the version=1.0 header and comments out all the tags (i.e. <SHARED-CACHE-MODE/>) only available in the 2.0 XSD.
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
Our provider tag looks like this
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
and our properties tag looks like this:
<properties>
<property name="*eclipselink.target-server"* value="*WebLogic_10*"/>
<property name="*eclipselink.logging.level.sql*" value="*FINER*"/>
<property name="*eclipselink.cache.shared.default*" value="*false*"/>
<property name="*eclipselink.logging.logger*" value="*DefaultLogger*"/>
</properties>
Following other recommended steps, our .ear root has an APP-INF/ structure that looks like this
./APP-INF/lib/eclipselink.jar
./APP-INF/lib/javax.persistence_2.0.3.v201010191057.jar
Our .earRoot/META-INF/weblogic-application.xml file includes
<wls:prefer-application-packages>
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>org.eclipse.persistence.*</wls:package-name>
</wls:prefer-application-packages>
Our .earRoot/META-INF/MANIFEST.MF file looks like this
Manifest-Version: 1.0
Class-Path: javax.persistence_2.0.3.v201010191057.jar eclipselink.jar
Our .earRoot/.warRoot/WEB-INF/weblogic.xml looks includes
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
Believing that we have covered all the recommened steps documented under "alternative 3" at the above cited EclipseLink wiki, we deploy this new app .ear to the WLS 10.3.1 instance and encounter the following Exception:
+weblogic.deployment.EnvironmentException: Error processing persitence unit ReleaseBObjectModel of module /IConWorkspace: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit ReleaseBObjectModel: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider+
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:322)
at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:123)
at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:331)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:111)
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
Truncated. see log file for complete stacktrace
Any ideas on what we need to do to overcome this CCE? Is our deployment both sound and complete wrt to our providing the necessary .earRoot/APP-INF/lib/ JPA 2.0 standard interface and eclipseLink implementation .jars?
We are a bit stuck.
We understand all the issues wrt WLS 10.3.1 being a particularly challenging JEE 5 platform on which to coerce JEE 6 capability (like JPA 2.0) ... we realize that this effoprt would be easier on WLS 10.3.4.
However, at this time, WLS 10.3.1 is the only platform on which we are allowed to attempt to deploy this application.
Thanks,
Ben.Cotton@csg.com
We want to deploy a new app .ear to a WLS 10.3.1 instance with JPA 2.0 provider=eclispeLink (so that it can use the new javax.persistence.metamodel package API). We want to do this in a way that assures that the new app .ear deployment in no way impacts any other app .ear deployment using JPA 1.0 on that same WLS 10.3.1 instance.
We have basically covered all the steps documented under "alternative 3" on the EclipseLink wiki page addressing this issue (see [http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#20110115:_JPA_2.0_using_EclipseLink_on_WebLogic_10.3.4.0|http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#20110115:_JPA_2.0_using_EclipseLink_on_WebLogic_10.3.4.0] )
Because we could not get past the verison=2.0 XSD validation issue on deployment, our app's persistence.xml uses the version=1.0 header and comments out all the tags (i.e. <SHARED-CACHE-MODE/>) only available in the 2.0 XSD.
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
Our provider tag looks like this
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
and our properties tag looks like this:
<properties>
<property name="*eclipselink.target-server"* value="*WebLogic_10*"/>
<property name="*eclipselink.logging.level.sql*" value="*FINER*"/>
<property name="*eclipselink.cache.shared.default*" value="*false*"/>
<property name="*eclipselink.logging.logger*" value="*DefaultLogger*"/>
</properties>
Following other recommended steps, our .ear root has an APP-INF/ structure that looks like this
./APP-INF/lib/eclipselink.jar
./APP-INF/lib/javax.persistence_2.0.3.v201010191057.jar
Our .earRoot/META-INF/weblogic-application.xml file includes
<wls:prefer-application-packages>
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>org.eclipse.persistence.*</wls:package-name>
</wls:prefer-application-packages>
Our .earRoot/META-INF/MANIFEST.MF file looks like this
Manifest-Version: 1.0
Class-Path: javax.persistence_2.0.3.v201010191057.jar eclipselink.jar
Our .earRoot/.warRoot/WEB-INF/weblogic.xml looks includes
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
Believing that we have covered all the recommened steps documented under "alternative 3" at the above cited EclipseLink wiki, we deploy this new app .ear to the WLS 10.3.1 instance and encounter the following Exception:
+weblogic.deployment.EnvironmentException: Error processing persitence unit ReleaseBObjectModel of module /IConWorkspace: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit ReleaseBObjectModel: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider+
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:322)
at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:123)
at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:331)
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:111)
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
Truncated. see log file for complete stacktrace
Any ideas on what we need to do to overcome this CCE? Is our deployment both sound and complete wrt to our providing the necessary .earRoot/APP-INF/lib/ JPA 2.0 standard interface and eclipseLink implementation .jars?
We are a bit stuck.
We understand all the issues wrt WLS 10.3.1 being a particularly challenging JEE 5 platform on which to coerce JEE 6 capability (like JPA 2.0) ... we realize that this effoprt would be easier on WLS 10.3.4.
However, at this time, WLS 10.3.1 is the only platform on which we are allowed to attempt to deploy this application.
Thanks,
Ben.Cotton@csg.com