Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10

    May be.  The instructions are written for and (I have worked with WLS back to 10.3.0 in 2007 but not an earlier 10.0 version using a JPA 1.0 application).
    If there is a way you could try on a later server version - ideally this may help.

    All the steps (the manifest as well as the prefer-application-packages element) in alternative #3 must be done in order to override the modules jars with the ones in your EAR/APP-INF/lib

    thank you

Sri Sankaran wrote:


  Thanks for the response.  I have seen your previous posts on this topic and followed the instructions you have cited (for application managed JPA 2.0).


  Yet I am having this problem.  Could it have to do with the fact that I am on WebLogic server 10.0?  Are the instructions different for it?




From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Michael O'Brien
Sent: Tuesday, November 30, 2010 12:35 PM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10


    I have this one.  Reproducing on - done, reverifying CM and AM workarounds - in progress.
    I will get back to you shortly on this forum.

    In short for WLS and WLS only:
1) For an application managed JPA 2.0 persistence unit - follow the instructions to override everything on the server using your EAR (no server modifications)

2) For a container managed JPA 2.0 persistence unit - follow the section that essentially places the JPA 2.0 spec jar above the server-required JPA 1.0 jar (server modifications)

    I will advise when the following...
Caused By: weblogic.deployment.EnvironmentException: Error loading the persistence descriptor META-INF/persistence.xml from the module org.eclipse.persistence.example.jpa.dataparallel.serviceEJB.jar.  See the following stack trace for nested errors: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
  C:\wse\wls10330\org.eclipse.persistence.example.jpa.dataparallel.serviceEJB\build\classes\META-INF\persistence.xml:2:3:2:3: problem: cvc-attribute.4: The value '2.0' does not equal the fixed value '1.0' of attribute 'version':<C:\wse\wls10330\org.eclipse.persistence.example.jpa.dataparallel.serviceEJB\build\classes/META-INF/persistence.xml:2:3>

    Works with

<persistence version="2.0" xmlns="" xmlns:xsi="" xsi:schemaLocation="">

    thank you

Sri Sankaran wrote:

I am having no luck deploying my application that uses JPA 2.0 API to a WebLogic 10 instance.


The application is deployed as an EAR as explained in the Eclipselink wiki.  The error I see at startup suggests that WebLogic is continuing to use its (internal) JPA 1.0.  The error is:


<Nov 30, 2010 10:46:03 AM EST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor weblogic.utils.classloaders.ChangeAwareClassLoader@64bc1e finder

: weblogic.utils.classloaders.CodeGenClassFinder@ed053a annotation: viporear23@apps/vipor/WEB-INF/lib/_wl_cls_gen.jar!/META-INF/persistence.xml of module apps/vipor. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND

        at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(

        at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(

        at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(


It is almost as if WebLogic is ignoring JARs in the APP-INF/lib directory of the EAR. 


If I were to downgrade my persistence.xml to version 1.0, the above error is replaced by a ClassCastException


<Nov 30, 2010 10:57:30 AM EST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'viporear23' due to error weblogic.application.ModuleException: .weblogic.application.ModuleException:

        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(

        Truncated. see log file for complete stacktrace

weblogic.deployment.EnvironmentException: Error processing persitence unit GporsPU of module apps/vipor: Error instantiating the Persistence Provider

class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit GporsPU: java.lang.ClassCastException: org.eclipse.persistence.jpa.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



I realize that this is not an Eclipselink problem per se.  I am writing in the hope that al fellow subscriber to this list has encountered this problem and has a workaround.  I have posted this issue to Oracle’s WebLogic forum as well.





eclipselink-users mailing list


_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx

Back to the top