My Oracle Support Banner

Deploy Fails with: Exception Creating ENTITYMANAGER using Persistence Provider (Doc ID 785959.1)

Last updated on JANUARY 30, 2022

Applies to:

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


Deploying an application where the deployed archive and/or the java classpath contains multiple occurrences of the deployment mapping file can raise the following exception:

Operation failed with error: [<application name>:<context root>] -
Exception creating EntityManagerFactory using PersistenceProvider class
oracle.toplink.essentials.PersistenceProvider for persistence unit <persistence-unit name>.
Exception [TOPLINK-7252] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))):
Exception Description: There are multiple mapping files called[orm.xml] in classpath for
persistence unit named [ <persistence-unit name>].
at oracle.toplink.essentials.exceptions.ValidationException.nonUniqueMappingFileName(
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readExplicitlySpecifiedMappingFiles(
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readMappingFiles(
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(
at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(


Typically in a Java CLASSPATH the same class or resource can exist multiple times, and by default the one first on the classpath is used by the class loader.  This sometimes makes developing/testing easier because a set of classes/resources can be put ahead on the classpath to override classes. When moving into production however, this becomes an issue because the orm.xml file cannot have multiple copies during application deployment.


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.