My Oracle Support Banner

'IllegalArgumentException: No persistence unit' Error When Application Deployed From 12c OEPE (Doc ID 1400524.1)

Last updated on MARCH 01, 2024

Applies to:

Oracle WebLogic Server - Version and later
Oracle TopLink - Version and later
Information in this document applies to any platform.


Using  Oracle Enterprise Pack for Eclipse (10.3.x / 12c OEPE),   a J2EE application is  developed,   deployed  into 12.1.1 WLS  server.

When invoking  servlet of this application, the following exception is occuring :

java.lang.IllegalArgumentException: No persistence unit named 'laadmin' is available in scope Test. Available persistence units: []
at weblogic.persistence.ModulePersistenceUnitRegistry.getPersistenceUnit(
at weblogic.persistence.BasePersistenceContextProxyImpl.(
at weblogic.persistence.TransactionalEntityManagerProxyImpl.(
at weblogic.persistence.EntityManagerInvocationHandlerFactory.createTransactionalEntityManagerInvocationHandler(
at weblogic.persistence.PersistenceManagerObjectFactory.createPersistenceContextProxy(

The servlet is invoking an EJB (TestEJB) embedded in the web application
and using JPA persistent unit (defined via @PersistenceContext(unitName="laadmin")) to get an entity as the following  :


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

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

In this Document

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