1 Reply Latest reply on Sep 15, 2006 3:31 AM by marcreis

    Correct way to deploy ear in a cluster

    sleepycrom

      My ear file contains both war application and ejb3. When I upload ear file to both servers in the cluster I get a NameAlreadyBoundException(only on stateless ejbs, not entity) on one of the servers(the one I start second).

      I have a default installation of jboss-4.0.4.GA in a linux redhat envoriment.

      The stateless class:

      @Stateless
      @Local ({IndexEngineBIZLocal.class})
      @LocalBinding (jndiBinding=BeanFactory.INDEX_ENGINE_BIZ_LOCAL)
      public class IndexEngineBIZBean implements IndexEngineBIZLocal {
      


      And exception:
      2006-09-14 12:09:10,817 INFO [org.jboss.ejb3.JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=PrivateEconomicDictionary-1.0.ear,jar=PrivateEconomicDictionaryBeans.jar,name=IndexEngineBIZBean,service=EJB3 with dependencies:
      2006-09-14 12:09:10,837 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB: no.tv2.nettavisen.privateeconomicadvice.biz.IndexEngineBIZBean ejbName: IndexEngineBIZBean
      2006-09-14 12:09:10,869 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:ear=PrivateEconomicDictionary-1.0.ear,jar=PrivateEconomicDictionaryBeans.jar,name=IndexEngineBIZBean,service=EJB3
      javax.naming.NamingException: Could not bind statless proxy with ejb name IndexEngineBIZBean into JNDI under jndiName: /pea/IndexEngineBIZ/local [Root exception is javax.naming.NameAlreadyBoundException]
       at org.jboss.ejb3.stateless.BaseStatelessProxyFactory.start(BaseStatelessProxyFactory.java:70)
       at org.jboss.ejb3.stateless.StatelessLocalProxyFactory.start(StatelessLocalProxyFactory.java:63)
       at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:107)
       at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:85)
       at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:80)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      


      Maybe farmdeployment can solve my problem. But where do I find documentation about that :-)

        • 1. Re: Correct way to deploy ear in a cluster
          marcreis

          It has been quite a while that I had a similar problem.
          I belive it was due to packing the ear/jar wrong. I dont know how exactly your archives are structured, but double check to see that it is the way it should be. I belive I had a misstake in my ant file that also packaged up a bit more than it should have (jndi.properties, etc.).

          Sincerly

          Marc