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

    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
  C:\bea\user_projects\domains\vipor\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:2:3:2:3: problem: cvc-attribute.4: The value '2.0' does not equal the fixed value '1.0' of attribute 'version':<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:2:3>
        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@xxxxxxxxxxx

Back to the top