Ambiguous ejb-link when ejb-name Exists Multiple Times in a WebLogic Server 12c Application (Doc ID 2105635.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 to 12.2.1.0.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

On 12.1.3.0.0 and 12.2.1 versions of WebLogic Server (WLS), while deploying EJB application with multiple ejb-name (same ejb-name) existing in the application, ambiguous ejb-link error is thrown in the Admin Console:

Message icon - Error weblogic.application.naming.ReferenceResolutionException: [J2EE:160092]Error: The ejb-link "ConfigurationManagerBean" declared in the ejb-ref or ejb-local-ref "com.test.test.nameconflict1.MyService1Bean/configurationManager" in the module "NameConflict1EJB.jar" is ambiguous. The following list of application modules contain an EJB with the name "ConfigurationManagerBean": NameConflict1EJB.jar/ConfigurationManagerBean, NameConflict2EJB.jar/ConfigurationManagerBean. Qualify this ejb-link to remove the ambiguity.
Message icon - Error [J2EE:160092]Error: The ejb-link "ConfigurationManagerBean" declared in the ejb-ref or ejb-local-ref "com.test.test.nameconflict1.MyService1Bean/configurationManager" in the module "NameConflict1EJB.jar" is ambiguous. The following list of application modules contain an EJB with the name "ConfigurationManagerBean": NameConflict1EJB.jar/ConfigurationManagerBean, NameConflict2EJB.jar/ConfigurationManagerBean. Qualify this ejb-link to remove the ambiguity.

Also these errors may be reported:

Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: NameConflict1.ear, Specification-Version: 1, Implementation-Version: 1.0.0, exact-match: false], [Extension-Name: NameConflict2.ear, Specification-Version: 1, Implementation-Version: 1.0.0, exact-match: false]


EXCEPTION LOG
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<Error> <Deployer> <LocalHost> <AdmSvr> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1437973662625> <BEA-149265> <Failure occurred in the execution of deployment request with ID "22289117738312" for task "2". Error is: "weblogic.management.DeploymentException: weblogic.application.naming.ReferenceResolutionException: [J2EE:160092]Error: The ejb-link "ConfigurationManagerBean" declared in the ejb-ref or ejb-local-ref "com.test.test.nameconflict1.MyService1Bean/configurationManager" in the module "NameConflict1EJB.jar" is ambiguous. The following list of application modules contain an EJB with the name "ConfigurationManagerBean": NameConflict2EJB.jar/ConfigurationManagerBean, NameConflict1EJB.jar/ConfigurationManagerBean. Qualify this ejb-link to remove the ambiguity."
weblogic.management.DeploymentException: weblogic.application.naming.ReferenceResolutionException: [J2EE:160092]Error: The ejb-link "ConfigurationManagerBean" declared in the ejb-ref or ejb-local-ref "com.test.test.nameconflict1.MyService1Bean/configurationManager" in the module "NameConflict1EJB.jar" is ambiguous. The following list of application modules contain an EJB with the name "ConfigurationManagerBean": NameConflict2EJB.jar/ConfigurationManagerBean, NameConflict1EJB.jar/ConfigurationManagerBean. Qualify this ejb-link to remove the ambiguity.
......
Caused By: weblogic.application.naming.ReferenceResolutionException: [J2EE:160092]Error: The ejb-link "ConfigurationManagerBean" declared in the ejb-ref or ejb-local-ref "com.test.test.nameconflict1.MyService1Bean/configurationManager" in the module "NameConflict1EJB.jar" is ambiguous. The following list of application modules contain an EJB with the name "ConfigurationManagerBean": NameConflict2EJB.jar/ConfigurationManagerBean, NameConflict1EJB.jar/ConfigurationManagerBean. Qualify this ejb-link to remove the ambiguity.
at weblogic.application.naming.EnvUtils.findInfo(EnvUtils.java:811)
at weblogic.application.naming.EnvUtils.findInfoByEjbName(EnvUtils.java:729)
at weblogic.application.naming.EnvUtils.findInfoByEjbLink(EnvUtils.java:620)
at weblogic.application.naming.EjbReferenceResolver.resolveEjbRef(EjbReferenceResolver.java:95)
at weblogic.application.naming.EjbReferenceResolver.resolve(EjbReferenceResolver.java:71)
at weblogic.application.internal.flow.ReferenceResolutionFlow.resolveReferences(ReferenceResolutionFlow.java:40)
at weblogic.application.internal.flow.ReferenceResolutionFlow.prepare(ReferenceResolutionFlow.java:31)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:233)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:749)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1238)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:252)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:172)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

Changes

 WebLogic Server (WLS) upgraded to 12c. This issue is not encountered in WLS 10.3.6.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms