• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence

 
shirish singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Idea about the folwoing error:

module: EJBModule(MyFacade.jar)
Unable to deploy EJB: MerchantFacadeBean from MyFacade.jar:
No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence units: []
.
weblogic.application.ModuleException: Exception preparing module: EJBModule(MyFacade.jar)
Unable to deploy EJB: MerchantFacadeBean from MyFacade.jar:
No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence units: []
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence units: []
at weblogic.deployment.ModulePersistenceUnitRegistry.getPersistenceUnit(ModulePersistenceUnitRegistry.java:132)
at weblogic.deployment.BasePersistenceContextProxyImpl.<init>(BasePersistenceContextProxyImpl.java:39)
at weblogic.deployment.TransactionalEntityManagerProxyImpl.<init>(TransactionalEntityManagerProxyImpl.java:26)
at weblogic.deployment.EntityManagerInvocationHandlerFactory.createTransactionalEntityManagerInvocationHandler(EntityManagerInvocationHandlerFactory.java:18)
at weblogic.deployment.BaseEnvironmentBuilder.createPersistenceContextProxy(BaseEnvironmentBuilder.java:973)
Truncated. see log file for complete stacktrace
>
 
Chris Logan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The things that came up to my mind:

First thing first - did you configured persistence.xml file?
It should be in the META-INF catalog with ejb-jar.xml file.

Are you sure that your persistence unit name is "entityManager"? You can check it in persistence.xml file - the tag is <persistence-unit name="yourName">.

I don't have any more ideas I hope it will help you somehow.


Cheers
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic