File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "No persistence unit named Watch "No persistence unit named New topic
Author

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

shirish singh
Greenhorn

Joined: Mar 25, 2011
Posts: 1
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

Joined: Jan 31, 2011
Posts: 10
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No persistence unit named 'entityManager' is available in scope MyFacade.jar. Available persistence