• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RAD 7.5 NameAlreadyBoundException

 
Nancy O'Connell
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are upgrading from RAD 7/WAS 6.1 to RAD 7.5 / WAS 7.

Our project currently has multiple ears. On the servers, each ear runs in it's own JVM, but when we test locally, we test multiple ears on the same server. Some of these ears contain the same EJB's - for example, we have a CommonEJB that runs in both EAR_A and EAR_B.

With RAD 7 / WAS 6.1 this works with no problems.

When we try to run the same scenario under RAD 7.5 and WAS 7, we receive the following error:

The com.ejb.CommonHome interface of the Common bean in the CommonEJB.jar module of the EAR_A application cannot be bound to the ejb /com/ejb/CommonHome name location. The com.ejb.CommonHome interface of the Common bean in the CommonEJB.jar module of the EAR_B application has already been bound to the ejb/com//ejb/CommonHome name location.
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2728)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3826)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1122)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:609)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:725)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2046)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:439)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:382)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:110)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:949)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563)

WSVR0501E: Error creating component com.ibm.ws.runtime.component.CompositionUnitMgrImpl@4eda4eda
com.ibm.ws.exception.RuntimeWarning: javax.naming.NameAlreadyBoundException: The com.Common.ejb.CommonHome interface of the Common bean in the CommonEJB.jar module of the EAR_A application
cannot be bound to the ejb/ejb/CommonHome name location. The com.uhc.edist.Common.ejb.CommonHome
interface of the Common bean in the CommonEJB.jar module of the EAR_B application has already been bound to the ejb/ Common/ejb/CommonHome name location.

I realize that sometimes this message appears as a warning, but here it actually prevents the second EAR from running. There was a similar problem with
WAS 6.1 which was resolved by an update from IBM (PK69778).

We are running WAS 7.0.0.13, and Rational Application Developer Version: 7.5.5.3, Build ID: 20101203_0655.

Does anyone have any ideas?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't deploy the same ejb twice on the same server. You are supposed to be able to set up multiple profiles and start them at the same time. I haven't tried it in the latest version of RAD though.

This shouldn't have worked in RAD 7 either. Is it possible you had multiple server profiles set up and didnt' notice.
 
Nancy O'Connell
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response, but it does work in RAD 7, on a WAS 6.1 server. We have both ears running on the same server, same profile.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure why RAD/WAS 6.1 allowed you such a configuration. Prior to EJB 3.0 the JNDI info was part of the deployment descriptor so it was on developers to keep it unique. Since EJB 3.0 the JNDI is same as either your local or remote interface, which is again unique.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic