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.


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 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: '
at weblogic.servlet.internal.WebAppModule.startContexts(
at weblogic.servlet.internal.WebAppModule.start(
at weblogic.application.internal.flow.ModuleStateDriver$
at weblogic.application.utils.StateMachineDriver.nextState(
at weblogic.application.internal.flow.ModuleStateDriver.start(
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(
at org.hibernate.ejb.Ejb3Configuration.configure(

at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(


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


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.