Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » (no subject)
(no subject) [message #692441] Mon, 04 July 2011 12:24 Go to next message
Ben Cotton is currently offline Ben CottonFriend
Messages: 2
Registered: July 2011
Junior Member

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 )

Because we could not get past the verison=2.0 XSD validation issue on deployment, our app's persistence.xml use the <persistence version=1.0 ...> header and comments out all the tags (i.e. <SHARED-CACHE-MODE/>) only available in the 2.0 XSD.

Our provider tag looks like this


and our properties tag looks like this:

<property name="" 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"/>

Following other recommended steps from the EclipseLink wiki, our .ear root has an APP-INF/ structure that looks like this


Our .earRoot/META-INF/weblogic-application.xml file includes


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 includes


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(
at weblogic.deployment.PersistenceUnitInfoImpl.<init>(
at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(
at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(
at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(
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.

(no subject) [message #692492 is a reply to message #692441] Mon, 04 July 2011 14:48 Go to previous message
Michael OBrien is currently offline Michael OBrienFriend
Messages: 34
Registered: July 2009
Unfortunately, prior to WebLogic 10.3.4 you only have application managed persistence available for JPA 2.0. My page below details what can be done for older versions of WebLogic.

The issue with injection/instrumentation/proxying of a container managed JPA 2.0 @PersistenceContext is that the DI code in WebLogic needs to be aware of the JPA 2.0 EM and EMF (the 10.3.1 API was not forward compatible - you would need to hack the Spring based AOP injection code and the referenced EMFProxyImpl areas - and partiallly upgrade in effect to 10.3.4).
See the following patch to the 20110115 initial release for the code changes related to (XSD, weaving and injection)

Note: if you don't require the JPA 2.0 additions to the persistence schema like shared-cache-mode NONE then use the 1.0 xsd to avoid the parse error.

thank you
Michael O'Brien
michael.f.obrien at

cross references
Previous Topic:deploy .ear w/ JPA 2.0 provider=EclispeLink to WLS 10.3.1
Next Topic:(no subject)
Goto Forum:

Current Time: Sat Apr 17 16:10:41 GMT 2021

Powered by FUDForum. Page generated in 0.01488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top