WLS 10.3.4. In the xxx_EJB.jar area, there is no duration unit named "xxx". Available storage units: []

I have a corporate application project with 4 modules. It deploys to WLS 10.3.4. I am using eclipse helios for development using oracle web tools for eclipse. local WLS on my machine is set as development mode.

The structure of the project is as follows:

xxx_EAR |-> xxx_JPA |-> xxx_EJB |-> xxx_EJBClient |-> xxx_WEB 

common banks that are used through modules are in xxx_EAR / APP-INF / lib

inside xxx_JPA is persistence.xml with three units of duration, and in xxx_EJB there are classes, beans, which @PersistentContext uses to refer to them.

 EJB version is 3.0 JPA is 1.0 (Eclipselink 1.1.x) 

and everything works fine on my computer. when I try to deploy an EAR file on a test WLS, I get the following exception

 Unable to deploy EJB: XxxFacadeImpl from xxx_EJB.jar: No persistence unit named 'xxx_EJB' is available in scope xxx_EJB.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:518) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159) 

...

only the difference, as I see it, between the servers is in installation mode, the test WLS is set as production mode.

Do you have a hint?

Thanks in advance!

+4
source share
2 answers

Are the servers the same versions? What happens if you put everything in a JPA bank in an EJB bank, then it works?

0
source

I had the same error, but in reverse order. I can deploy the EAR for production or deploy from the WebLogic console just fine, but I cannot deploy locally through the Eclipse Weblogic plugin. For me, it worked with changing the version of javax.persistence_xxx.jar in the build path of the EJB project.

In my case, I am switching from javax.persistence_1.xxx to javax.persistence_2.xxx.

Hope this helps someone. In my search for a solution to this problem, the link below from the encoder also helped me.

http://www.coderanch.com/t/578851/EJB-JEE/java/persistence-unit-named-scope-BL

0
source

Source: https://habr.com/ru/post/1390222/


All Articles