1 Reply Latest reply on Mar 28, 2013 7:29 AM by petal1

    JBoss 6 deployment error - "missing dependencies"

    petal1

      Hello,

       

      I am switching from 4.0.4.GA to 6.0.0.Final. I have resolved many of the issues I have come across, but this one has got me stumped. I have a sar file in my deploy directory called startup.sar. It basically defines some tasks that should be executed when JBoss starts (and some when it is shutdown). Perhaps there is a better way of doing that in JBoss6, but I guess that is a different question.

       

       

      startup.sar contains a META-INF/jboss-service.xml file with the following contents:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <service>

        <mbean code="com.myplace.startup.MyStartup" name=":service=MyStartup">

          <depends>jboss.jca:service=RARDeployer</depends>

          <depends>jboss.jca:service=LocalTxCM,name=MyDS</depends>

          <depends>jboss.j2ee:module=MyOther.jar,service=EjbModule</depends>

          <depends>jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule</depends>

         

          <attribute name="Tasks">

            <tasks>

              <property task="com.myplace.MyStartupTask"

                  executeOnStart="true"

                  executeOnShutdown="false"

                  startupPriority="50"

                  alias="myAlias"/> 

              <!-- etc -->

            </tasks>

          </attribute>

        </mbean>

      </service>

       

       

       

      16:30:37,536 ERROR [ProfileServiceBootstrap] Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment ":service=MyStartup" is missing the following dependencies:

          Dependency "jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule' **")

          Dependency "jboss.j2ee:module=MyOther.jar,service=EjbModule" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.j2ee:module=MyOther.jar,service=EjbModule' **")

          Dependency "jboss.jca:service=RARDeployer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:service=RARDeployer' **")

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule' **

        Deployment "jboss.jca:service=RARDeployer" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:service=RARDeployer' **

        Deployment "jboss.j2ee:module=MyOther.jar,service=EjbModule" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:module=MyOther.jar,service=EjbModule' **

       

       

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]

              at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_43]

       

      I suspect the problem is my META-INF/jboss-service.xml file in the startup.sar?

       

      I have found a few other jboss-service.xml files and looking in them makes me consider changing my Data Source dependency line to:

        <depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=MyDS</depends>

       

      but I am not sure what other changes I would need to make to the file. I decided to have a look at jmx-console to see if that gave me any clues, but having looked at jmx-console it made me think that the the format of the "depends" lines is correct. For example, under jboss.j2ee I can see:

        module="MyJBossMDB.jar",service=EjbModule

       

       

      Thanks in advance for any help.

        • 1. Re: JBoss 6 deployment error - "missing dependencies"
          petal1

          After a lot of digging around, I resolved this issue. In case it helps anyone else, here is the resolution:

           

          - Add this to MyJbossMDB.jar:META-INF/jboss.xml

              <jmx-name>jboss.j2ee:module=MyJBossMDB.jar,service=EjbModule</jmx-name>

           

          - Add this to MyOther.jar:META-INF/jboss.xml

              <jmx-name>jboss.j2ee:module=MyOther.jar,service=EjbModule</jmx-name>

           

          - Change the DTD definition in the META-INF/jboss.xml file in both the above jars from 3.0 to 6.0 (since jmx-name is not valid in the 3.0 version)

              <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_6_0.dtd">

           

          - Remove the dependency on RARDeployer

           

          - In the startup.sar:META-INF/jboss-service.xml, define the DS dependency as:

              <depends>jboss.jca:service=DataSourceBinding,name=MyDS</depends>

           

          From what I have read, it should not have been necessary to have made the jmx-name changes as the original problem I reported is a bug that was supposedly fixed in 6.0.0.M3. That does not appear to be the case however and the above changes were necessary in my scenario.

           

          Paul