Ilias Stavrakis
Ilias Stavrakis

Reputation: 753

EntityManagerFactory is closed in Weblogic while deploying an ear

I have two separate ear files that use the same persistence unit defined in their persistence.xml. While deploying the second ear file in a Weblogic 12.2.1.3 I'm getting the following error:

weblogic.application.ModuleException: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory. at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123) at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114) at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212) at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207) at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83) at weblogic.work.ContextWrap.run(ContextWrap.java:46) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670) at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352) at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337) at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57) at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415) at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)

I cannot find any information about the life cycle of EntityManagerFactory in Weblogic. Why an EntityManagerFactory may be closed from weblogic. Could anyone give a hint about the problem or a link where I could find more information.

The ear files contain a standard JEE7 SOAP Web services that use JPA, JTA and eclipse link 2.5.2 as JPA engine.

Upvotes: 0

Views: 528

Answers (2)

Ilias Stavrakis
Ilias Stavrakis

Reputation: 753

Oracle support refer that this is a bug that will be fixed in 12.2.1.4. Until then the patch 29154575 is only valuable if Weblogic version is 12.2.1.2.0. As a workaround you can disable Parallel Deploy Application Module feature in config.xml file of Weblogic.

Upvotes: 0

Saxon
Saxon

Reputation: 937

This is weblogic bug. See Doc ID 2502618.1 on Oracle support.

Suggested solutions from Oracle support:

As a solution apply patch 29154575 As a workaround: Disable Parallel Deploy Application Module feature. Disabling this will ensure that various modules of application are activated sequentially avoiding the race condition.

Upvotes: 1

Related Questions