2 Replies Latest reply on Sep 25, 2003 12:21 PM by nethaji

    Deploying two EARs in same JBoss

    vikash_sharma

      Hi,
      I have a requirement to deploy two EARs in the same JBoss environment which have some common libraries and one ear can look for ejb deployed in second one. My JBoss is Jboss 3.2.1 tomcat version. If I deploy both of them as it is, then when the lookup happens it gives DuplicateClass exceptions for common library classes because Jboss searches in all ear's libraries.
      I read that if I put a separate loader repository in jboss-app.xml then this can be resolved. I tried that by putting following snippets in my jboss-app.xml for both ears
      <jboss-app>
      <loader-repository>
      utils:service=LoaderRepository
      </loader-repository>
      </jboss-app>

      Now when the first ear's ejb's is looked up for a home, it returns null.

      I am not sure about the syntax for loader repository and what it expects here.

      Please help me in finding the correct way to achieve my deployment model.

      Thanking in advance,
      Regards,
      Vikash

        • 1. Re: Deploying two EARs in same JBoss
          vikash_sharma

          I forgot to add the stacktrace. The home is not null but when it is trying to create it is throwing null pointer exception

          23:17:10,539 ERROR [LogInterceptor] RuntimeException:
          java.lang.NullPointerException
          at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHo
          me(StatelessSessionContainer.java:592)
          at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
          keHome(CachedConnectionInterceptor.java:206)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(
          StatelessSessionInstanceInterceptor.java:51)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
          rceptor.java:88)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
          torCMT.java:243)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.ja
          va:74)
          at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
          tor.java:92)
          at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
          20)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
          actoryFinderInterceptor.java:93)
          at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessS
          essionContainer.java:310)
          at org.jboss.ejb.Container.invoke(Container.java:694)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
          nDispatcher.java:284)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
          at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)

          at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
          a:83)
          at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
          java:46)
          at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
          5)
          at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
          at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
          at $Proxy46.create(Unknown Source)
          at com.abb.vm.api.HostManager.getHostRemote(HostManager.java:166)

          • 2. Re: Deploying two EARs in same JBoss
            nethaji

            Hi,

            I am new to JBoss. Currently we are using BEA Logic as App server. My current aplication is packaged as WAR. I want deploy the same app in JBoss. I have installed JBoss in windows. Could you please provide me the deployment steps or procedures? Or please give me he steps to deploy as EAR.

            thanks in advance,
            Nethaji