2 Replies Latest reply on Jan 7, 2009 5:50 PM by mturner24

    [4.2.2] NameAlreadyBoundException on deploy when binding Use

    mturner24

      Hi !

      Server configuration:
      jBoss 4.2.2 GA


      I have an EAR with 2 EJB3 jars and 3 WARs.

      When Jboss starts and try to deploy the third war, I get this exception :


      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NameAlreadyBoundException)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:384)
      at org.jboss.web.WebModule.startModule(WebModule.java:83)
      at org.jboss.web.WebModule.startService(WebModule.java:61)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      [...]
      Caused by: javax.naming.NameAlreadyBoundException
      at org.jnp.server.NamingServer.bind(NamingServer.java:144)
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:591)
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:552)
      at org.jboss.web.AbstractWebDeployer.parseWebAppDescriptors(AbstractWebDeployer.java:495)
      at org.jboss.web.AbstractWebDeployer$DescriptorParser.parseWebAppDescriptors(AbstractWebDeployer.java:878)
      at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:159)
      at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
      at org.jboss.web.WebModule.startModule(WebModule.java:83)
      at org.jboss.web.WebModule.startService(WebModule.java:61)


      This happens on the 3rd war only, If I change the order of the wars deployed, it does only fail on the 3rd one. No matter which war it is.
      If I deploy only 2 wars it works perfectly for any combination of the 2. ???

      Before all 3 wars used to deploy good when my EAR consisted of: 3 WARs and 2 EJB JAR ( but only one EJB3, the other one EJB2.1), Just recently I converted the other EJB jar to EJB3. Sinc ethen I can't deploy any 3rd WAR in my EAR.

      Any idea of what could be causing a problem. I see in the logs that the binding of UserTransaction is done succesfully multiple times for all the other deployment (mines and jboss's one)

      Thank you in advance !