Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Eclipselink 2 / JPA 2 with WebLogic 10.3.3

Michael,

                Sounds familiar – you are getting the same CNFE during EMF preprocessing as Jehanzeb from March 2010.

http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04375.html

 

                Note: JPA 2.0 (JSR-317) is part of the Java EE 6 specification and started officially shipping with WebLogic 10.3.4.0 in Jan 2011.

                It looks from your stacktrace that you are using CDI in the EJB container in I assume a SSB – also using the JRockit or the SUN JVM may make a difference as I would have expected you to fail later on a JPA 2 internal call like getMetamodel() or a NSME on getValidationMode().  Therefore if you wish to use @PersistenceContext injection – for JPA 2.0 – this is only possible in WebLogic 10.3.4.0 or later as the DI infrastructure is not in 10.3.3.0.  See the comment on my investigation bug for JPA 2.0 on WebLogic 10.3.3 below.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=296271#c11

                The workaround is to use an application managed @PersistenceUnit and the filtering classloader until you are able to upgrade to 10.3.4.0  - this would be available in the WAR not the EJB.jar.

 

                I may not have all the details on enabling JPA 2.0 in WebLogic 10.3.3.0 fresh anymore.  Is there any way for you to upgrade to a later WebLogic version.

 

                There may be an even hacky way to do this.

                Take the QWG8 patch for 10.3.4 and apply it to 10.3.3 – entirely experimental since my documentation on 10.3.3.0 was written before 10.3.4 was out – but it may work – but at this point the jar may not even work with the older version of WebLogic – and you may as well go all the way and download 10.3.5.0 – see the 12c download below

http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html

 

 

                Have you tried my PRE_CLASSPATH workaround to put the javax.persistence library higher in the classpath in comEnv.cmd – a hack for the server – but required in yourcase if you want to get JPA 2.0 working on a version of WebLogic developed before the spec was released.

http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support

 

                I quote….

*  manually add the com.oracle.jpa2support_1.0.0.0_2-0.jar ahead of the server classpath by following the instructions in the documentation at

*  http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309

*  or do it manually by modifying the following line directly on your server

C:\opt\wls10340_pub110115\wlserver_10.3\common\bin\commEnv.cmd
  set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar

               

                / Michael O’Brien

 

From: Michael Gitelman [mailto:mgitelman@xxxxxxxxxxxxxxx]
Sent: February 7, 2012 15:59
To: Michael O'Brien
Subject: RE: Eclipselink 2 / JPA 2 with WebLogic 10.3.3

 

Michael,

 

Thank you very much for your help. I believe I have followed your instructions for DI1.1.

 

I am getting the following error during EAR Deployment:

 

<Feb 7, 2012 2:26:17 PM EST> <Error> <Deployer> <BEA-149265> <Failure occurred i

n the execution of deployment request with ID '1328642727682' for task '0'. Erro

r is: 'java.lang.NoClassDefFoundError: weblogic/deployment/PersistenceUnitInfoIm

pl'

java.lang.NoClassDefFoundError: weblogic/deployment/PersistenceUnitInfoImpl

        at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(

AbstractPersistenceUnitRegistry.java:336)

        at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe

scriptor(AbstractPersistenceUnitRegistry.java:250)

        at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis

tenceUnitRegistry.java:69)

        at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistr

y(EJBModule.java:221)

        at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:32

2)

        Truncated. see log file for complete stacktrace

 

Caused By: java.lang.NoClassDefFoundError: weblogic/deployment/PersistenceUnitIn

foImpl

        at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(

AbstractPersistenceUnitRegistry.java:336)

        at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe

scriptor(AbstractPersistenceUnitRegistry.java:250)

        at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis

tenceUnitRegistry.java:69)

        at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistr

y(EJBModule.java:221)

        at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:32

2)

        Truncated. see log file for complete stacktrace

> 

<Feb 7, 2012 2:26:17 PM EST> <Warning> <Deployer> <BEA-149004> <Failures were de

tected while initiating deploy task for application 'odev20122_eAdmin'.>

<Feb 7, 2012 2:26:17 PM EST> <Warning> <Deployer> <BEA-149078> <Stack trace for

message 149004

java.lang.NoClassDefFoundError: weblogic/deployment/PersistenceUnitInfoImpl

        at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(

AbstractPersistenceUnitRegistry.java:336)

        at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe

scriptor(AbstractPersistenceUnitRegistry.java:250)

        at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis

tenceUnitRegistry.java:69)

        at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistr

y(EJBModule.java:221)

        at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:32

2)

        Truncated. see log file for complete stacktrace

 

Caused By: java.lang.NoClassDefFoundError: weblogic/deployment/PersistenceUnitIn

foImpl

        at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(

AbstractPersistenceUnitRegistry.java:336)

        at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe

scriptor(AbstractPersistenceUnitRegistry.java:250)

        at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis

tenceUnitRegistry.java:69)

        at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistr

y(EJBModule.java:221)

        at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:32

2)

        Truncated. see log file for complete stacktrace

> 

<Feb 7, 2012 2:26:17 PM EST> <Error> <Console> <BEA-240003> <Console encountered

the following error weblogic.application.WrappedDeploymentException: weblogic/d

eployment/PersistenceUnitInfoImpl

        at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(

AbstractPersistenceUnitRegistry.java:336)

        at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe

scriptor(AbstractPersistenceUnitRegistry.java:250)

        at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis

tenceUnitRegistry.java:69)

        at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistr

y(EJBModule.java:221)

        at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:32

2)

        at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersisten

ceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)

        at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:398)

 

        at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedM

oduleDriver.java:176)

        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu

leListenerInvoker.java:199)

        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl

oymentCallbackFlow.java:507)

        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD

river.java:41)

        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep

loymentCallbackFlow.java:149)

        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep

loymentCallbackFlow.java:45)

        at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja

va:1221)

        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD

river.java:41)

        at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j

ava:367)

        at weblogic.application.internal.EarDeployment.prepare(EarDeployment.jav

a:58)

        at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme

ntStateChecker.java:154)

        at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App

ContainerInvoker.java:60)

        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr

eateAndPrepareContainer(ActivateOperation.java:207)

        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do

Prepare(ActivateOperation.java:98)

        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr

epare(AbstractOperation.java:217)

        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym

entPrepare(DeploymentManager.java:747)

        at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy

mentList(DeploymentManager.java:1216)

        at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare

(DeploymentManager.java:250)

        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre

pare(DeploymentServiceDispatcher.java:159)

        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb

ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)

        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb

ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)

        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb

ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)

        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin

gWorkManagerImpl.java:528)

        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

 

 

 

 

Best regards,

 

 

Michael Gitelman

mgitelman@xxxxxxxxxxxxxxx

 

Delphi Technology, Inc.

One Washington Mall, Suite 3

Boston, MA  02108

O: 617 259 1256

F: 617 778 2296

www.delphi-tech.com

 

Experience, Innovation... Results.

From: Michael O'Brien [mailto:Michael.F.Obrien@xxxxxxxxx]
Sent: Tuesday, February 07, 2012 3:32 PM
To: EclipseLink User Discussions
Cc: Michael Gitelman
Subject: FW: Eclipselink 2 / JPA 2 with WebLogic 10.3.3

 

Michael,

                Hi, there is a section linked from

http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#JSR-317_JPA_2.0_Support

                to

http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-_In_Use

                that covers 10.3.3 – primarily through the <prefer-application-packages> classloader order workaround.  The WebLogic Server 10.3.4.0/10.3.5.0 release deprecates these instructions.

                If you read through the page above you will see that injection of a full container managed JPA 2.0  @PersistenceContext entityManager may have issues in the past  (JPA 1.0 injection is fine) – until 10.3.4.0 – where the AOP injection framework in WebLogic was updated to work with the 2.0 providers.  Regardless, you are able to use the JPA 2.0 API at runtime however even if you use a 1.0 schema.

                Currently even in 10.3.5 JPA 1.0 is still enabled by default – there are several ways enable JPA 2.0 – one way of which is via the OEPE plugin for Eclipse at design time.  After you enable JPA 2.0 – full JPA 2.0 injection in the EJB container is possible.

 

                I am posting to the EclipseLink Users newsgroup to widen the audience and responses.

                If you follow the 7 instructions in design issue 1.1 Alternative 3 above – you will have one possible workaround for the 10.3.3 specific issue

 

                What problems are you seeing? Are you having runtime issues with @PersistenceContext CDI injection or using the 2.0 schema in your XSD during deployment?

 

                Thank you

                /Michael O’Brien

 

From: Michael Gitelman

Date: Tue, 7 Feb 2012 13:22:36 -0500

To: michael.f.obrien eclipselink org

Subject: Eclipselink 2 / JPA 2 with WebLogic 10.3.3

 

Hi Michael,

 

I read your tutorial on EclipseLink /Development / JPA 2.0 / Weblogic. Unfortunately, I couldn’t find the information on how it works with WL 10.3.3. Unfortunately, I am stuck with that release for another year and need to make it work with JPA 2 / Eclipselink 2.2. However, everywhere I look I find references for 10.3.3 instructions but not the instructions themselves. Could you help me out to find a document specific to 10.3.3?

 

 

Best regards,

 

Michael Gitelman


Back to the top