4 Replies Latest reply on Oct 27, 2008 5:04 AM by Daniel Bevenius

    War file dependency

    Denys Newbie

      How to make dependency to war file in deploymnet.xml?

        • 1. Re: War file dependency
          Daniel Bevenius Master

          You can specify this like so:

          <jbossesb-deployment>
           <depends>destination:service=Queue,name=quickstart</depends>
           <esb-depends>SomeWar.war</esb-depends>
          </jbossesb-deployment>


          Regards,

          /Daniel

          • 2. Re: War file dependency
            Kevin Conner Master

            Daniel beat me to it :)

            The reason for the different mechanism is that the MBean generated by the war deployment is not consistent, so we had to add explicit support for this.

            We believe this is the only deployment which is like this so everything else should be possible using the normal 'depends' tags.

            • 3. Re: War file dependency
              Denys Newbie

              Daniel, I have drools-jbrms.war file in deploy directory and I want to have dependency to it.
              Here is my deployment.xml

              <?xml version="1.0" encoding="UTF-8"?>
              <jbossesb-deployment>
               <depends>jboss.esb:deployment=spring.esb</depends>
               <esb-depends>drools-jbrms.war</esb-depends>
              </jbossesb-deployment>
              


              -1.0.esb; - nested throwable: (org.jboss.deployment.DeploymentException: Could n
              ot locate WAR subdeployment matching: drools-jbrms.war)
              at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer.create(JBoss4ESB
              Deployer.java:356)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
              er.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
              or.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
              BeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:634)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
              bstractDeploymentScanner.java:336)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
              upport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
              eanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
              er.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(ServiceControl
              ler.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
              sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
              er.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
              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:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
              er.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
              or.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
              BeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
              java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
              at org.jboss.Main.boot(Main.java:200)
              at org.jboss.Main$1.run(Main.java:508)
              at java.lang.Thread.run(Thread.java:619)
              Caused by: org.jboss.deployment.DeploymentException: Could not locate WAR subdep
              loyment matching: drools-jbrms.war
              at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer.create(JBoss4ESB
              Deployer.java:308)
              ... 67 more



              • 4. Re: War file dependency
                Daniel Bevenius Master

                Hi,

                the 'esb-depends' element is used to declare dependencies on a war archive located inside .esb archive. Sounds like your .esb archive is dependent of a war that is external to your .esb archive.

                Please refer to the comment on this jira:
                https://jira.jboss.org/jira/browse/JBESB-1359;jsessionid=542EA3278FB2793F4261777B69C31034?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel, specifically where Kevin mentions the reason for the war dependency not working.

                As a solution you could add the drools-jbrms.war to the jbrules.esb archive. Then specify that jbrules.esb depends on the drools-jbrms.war:

                <?xml version="1.0" encoding="UTF-8"?>
                <jbossesb-deployment>
                 <depends>jboss.esb:deployment=jbossesb.esb</depends>
                 <esb-depends>drools-jbrms.war</esb-depends>
                </jbossesb-deployment>


                And in your .esb archive specify that it depends on jbrules:
                <jbossesb-deployment>
                 <depends>jboss.esb:deployment=jbrules.esb</depends>
                </jbossesb-deployment>


                Regards,

                /Daniel

                [/url]