• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RAD 7.5 NameAlreadyBoundException

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic