My Oracle Support Banner

WLS10.3.5 -java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo -Loading JPA2 from within the application- EAR/WAR (Doc ID 1616378.1)

Last updated on NOVEMBER 02, 2017

Applies to:

Oracle WebLogic Server - Version 10.3.5 to 10.3.6
Information in this document applies to any platform.

Symptoms

On WLS 10.3.5, trying to load the JPA2 jar's from within the application itself i.e using the filtering classloader methodology with <wls:package-name>javax.persistence.*</wls:package-name> and placing the javax.persistence_1.0.0.0_2-0-0.jar and com.oracle.jpa2support_1.0.0.0_2-0.jar within the APP-INF/lib,we run into below exceptions

<Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1389894916448' for task '0'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:526)

at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:268)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
...

 

Is this a known limitation/not supported to load above mentioned JPA2 jar's from within the APP-INF/lib? 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.