Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA 2.0 and WebLogic 10
JPA 2.0 and WebLogic 10 [message #545224] Wed, 07 July 2010 09:06 Go to next message
Oliver Libutzki is currently offline Oliver LibutzkiFriend
Messages: 2
Registered: July 2010
Junior Member
Hi everyone,

I would like to run a JPA 2.0 application on a Oracle WebLogic 10.0.0 and 10.3 application server. Unfortunately WebLogic doesn't support JPA 2.0 so far. I did some adjustments in order to get my application running as mentioned in this great abstract.

I tried to configure my application this way: "DI 1.1: Alternative 3: Application Level Shared Library "

It doesn't work (stacktrace at the end of my post). So I deceded to use one of the ear-files provided by the ticket.

I've used this one: " Preliminary example EAR - application managed EM, container managed JTA DS, bootstrap EMF (option 3 of 6 - UC 1 of 4) - add eclipselink.jar to app-lib (5Mb)". I added the eclipselink.jar to the APP-INF/lib directory and installed this application.

The result is the same: I get a ClassCastException:
Caused By: weblogic.deployment.EnvironmentException: Error processing persistence unit example of module enterprise: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example: 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.createEntityManagerFactory(
	at weblogic.deployment.PersistenceUnitInfoImpl.<init>(
	at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(
	at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(
	at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(
	at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(
	at weblogic.servlet.internal.WebAppModule.getWebClassLoader(
	at weblogic.servlet.internal.WebAppServletContext.initClassLoader(
	at weblogic.servlet.internal.WebAppServletContext.<init>(
	at weblogic.servlet.internal.WebAppServletContext.<init>(
	at weblogic.servlet.internal.HttpServer.loadWebApp(
	at weblogic.servlet.internal.WebAppModule.registerWebApp(
	at weblogic.servlet.internal.WebAppModule.prepare(
	at weblogic.application.internal.flow.ScopedModuleDriver.prepare(
	at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(
	at weblogic.application.internal.flow.DeploymentCallbackFlow$
	at weblogic.application.utils.StateMachineDriver.nextState(
	at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(
	at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(
	at weblogic.application.internal.BaseDeployment$
	at weblogic.application.utils.StateMachineDriver.nextState(
	at weblogic.application.internal.BaseDeployment.prepare(
	at weblogic.application.internal.EarDeployment.prepare(
	at weblogic.application.internal.DeploymentStateChecker.prepare(
	at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(
	at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(
	at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(
	at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(
	at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(
	at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(
	at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(
	at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(
	at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(
	at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(
	at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$

Using Google it looks like many developers hit on this problem, as there seems to be a conflict between JAP 1 and JPA 2.0.

Thanks for your help.

Kind regards
Re: JPA 2.0 and WebLogic 10 [message #545636 is a reply to message #545224] Thu, 08 July 2010 13:32 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

What aspects of JPA 2.0 are you trying to use?

If it is just the new annotations/mappings these will work with EclipseLink in JPA 1.0 as well.

If you wish to use the JPA 2.0 EntityManager API, the easiest way, I think is to just replace the JPA 1.0 jar in WLS with the 2.0 jar.

Are you using a managed or non-managed EntityManager?

James : Wiki : Book : Blog : Twitter
Previous Topic:Foreign key to unique field not primary key problem
Next Topic:oracle database trigger and INSERT problem
Goto Forum:

Current Time: Sun Mar 29 22:50:40 GMT 2020

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

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

Back to the top