4 Replies Latest reply: Apr 16, 2012 7:20 PM by Carlos Celis Osorio RSS

    javax.naming.NameAlreadyBoundException for EjbSynchronizations

    Adrian Mitev Master

      Hi folks! I have two seam applications on the same jboss but when deploying i get the following exception:


      2009-12-23 11:43:12,986 INFO  [JndiSessionRegistrarBase] (main) Binding the following Entries in Global JNDI:
      
              EjbSynchronizations/local - EJB3.x Default Local Business Interface
              EjbSynchronizations/local-org.jboss.seam.transaction.LocalEjbSynchronizations - EJB3.x Local Business Interface
      
      2009-12-23 11:43:12,990 INFO  [SessionSpecContainer] (main) Stopping jboss.j2ee:ear=UserManagement.ear,jar=UserManagement.ear,name=EjbSynchronizations,service=EJB3
      2009-12-23 11:43:12,998 INFO  [EJBContainer] (main) STOPPED EJB: org.jboss.seam.transaction.EjbSynchronizations ejbName: EjbSynchronizations
      2009-12-23 11:43:12,998 ERROR [AbstractKernelController] (main) Error installing to Start: name=jboss.j2ee:ear=UserManagement.ear,jar=UserManagement.ear,name=EjbSynchronizations,service=EJB3 state=Create
      java.lang.RuntimeException: Could not bind Reference Class Name: Proxy for: org.jboss.seam.transaction.LocalEjbSynchronizations
      Type: ProxyFactoryKey
      Content: ProxyFactory/UserManagement/EjbSynchronizations/EjbSynchronizations/local
      Type: EJB Container Name
      Content: jboss.j2ee:ear=UserManagement.ear,jar=UserManagement.ear,name=EjbSynchronizations,service=EJB3
      Type: Proxy Factory is Local
      Content: true
      Type: Local Business Interface
      Content: org.jboss.seam.transaction.LocalEjbSynchronizations
       into JNDI at "EjbSynchronizations/local"
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:915)
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:895)
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:884)
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:151)
              at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:210)
              at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:577)
              at org.jboss.ejb3.stateful.StatefulContainer.lockedStart(StatefulContainer.java:232)
              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
      
      Caused by: javax.naming.NameAlreadyBoundException: local
              at org.jnp.server.NamingServer.bind(NamingServer.java:209)
      



      The same problem is with TimerServiceDispatcher. I have setted loader-repository in jboss-app.xml.


      The seam jar is inside EAR/lib and i have defined it in application.xml like this:


      <module>
          <ejb>lib/jboss-seam.jar</ejb>
      </module>
      



      Idea how to fix this?