4 Replies Latest reply on Apr 24, 2017 8:49 AM by sidde sivajyothi

    missing dependency issues on multiple jars

    Syed Mahdi Apprentice

      I have a bit of a large or complex project. In the ear I have 2 ejb jars, 2 rars and one war which are subdeployments and besides that there are like some other jars that are dependencies for projects. the 2 ejb jars depend on two jars that use a jar Common-EJB-2.0.jar. this Common-EJB-2.0.jar is in the root of the ear where the rest of the jars and war are also placed. The error that comes when i deploy this ear is:

       

       

      09:24:38,315 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "RTMManagerServices-ear-4.2.5.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [

          "jboss.module.service.\"deployment.RTMlink-DataAccess-4.2.5.jar\".main is missing [module.resolved.service.\"deployment.RTMlink-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkServices-4.2.5.jar\".main.1 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

          "jboss.module.service.\"deployment.BRTManager-DataAccess-4.2.5.jar\".main is missing [module.resolved.service.\"deployment.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear\".main.1 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerEisConnector-4.2.5.rar\".main is missing [module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerEisConnector-4.2.5.rar\".main]",

          "jboss.module.resolve.phase.\"deployment.BRTManager-DataAccess-4.2.5.jar\".main.1 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main.2 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkEisConnector-4.2.5.rar\".main.2 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerServices-4.2.5.jar\".main.1 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main]",

          "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerEisConnector-4.2.5.rar\".main.2 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main]",

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear\".main is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main, module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear\".main]",

       

       

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main is missing [module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main]",

       

       

          "jboss.module.resolve.phase.\"deployment.RTMlink-DataAccess-4.2.5.jar\".main.1 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

       

       

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkEisConnector-4.2.5.rar\".main is missing [module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkEisConnector-4.2.5.rar\".main]",

       

       

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkServices-4.2.5.jar\".main is missing [module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlinkServices-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main]",

       

       

          "jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerServices-4.2.5.jar\".main is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main, module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManagerServices-4.2.5.jar\".main]"

       

      I have introduced a jboss-deployment-structure.xml in the src/main/application/META-INF/ folder and the contents so far are:

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

      <jboss-deployment-structure>

       

       

          <deployment>  

              <dependencies>                     

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar" />

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar" />

                     

                 

              </dependencies>  

          </deployment> 

          <sub-deployment name="BRTManagerServices-4.2.5.jar">

              <!-- This corresponds to the module for a web deployment -->

              <!-- it can use all the same tags as the deployment entry above -->

              <dependencies>

                  <!-- Adds a dependency on a ejb jar. This could also be done with a Class-Path entry -->

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar" />

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar" />

              </dependencies>

              <!-- Set's local resources to have the lowest priority -->

              <!-- If the same class is both in the sub deployment and in another sub deployment that -->

              <!-- is visible to the war, then the Class from the other deployment will be loaded,  -->

              <!-- rather than the class actually packaged in the war. -->

              <!-- This can be used to resolve ClassCastExceptions  if the same class is in multiple sub deployments-->

              <local-last value="true" />

          </sub-deployment>

          <sub-deployment name="RTMlinkServices-4.2.5.jar">

              <!-- This corresponds to the module for a web deployment -->

              <!-- it can use all the same tags as the deployment entry above -->

              <dependencies>

                  <!-- Adds a dependency on a ejb jar. This could also be done with a Class-Path entry -->

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar" />

                  <module name="deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar" />

       

       

              </dependencies>

              <!-- Set's local resources to have the lowest priority -->

              <!-- If the same class is both in the sub deployment and in another sub deployment that -->

              <!-- is visible to the war, then the Class from the other deployment will be loaded,  -->

              <!-- rather than the class actually packaged in the war. -->

              <!-- This can be used to resolve ClassCastExceptions  if the same class is in multiple sub deployments-->

              <local-last value="true" />

          </sub-deployment>

       

       

          <module name="deployment.RTMlink-DataAccess-4.2.5.jar">

             

              <dependencies>

                  <!-- Adds a dependency on a ejb jar. This could also be done with a Class-Path entry

                  -->

              <module name="deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar" />

         

          </dependencies>

             

          </module>

              <module name="deployment.BRTManager-DataAccess-4.2.5.jar">

             

              <dependencies>

                  <!-- Adds a dependency on a ejb jar. This could also be done with a Class-Path entry

                  -->

                          <module name="deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar" />

         

          </dependencies>

             

          </module>

      </jboss-deployment-structure> 

       

      I was hoping that i could remove the Common-EJB-2.0.jar errors with the above xml but it didnot go away. I would want to understand two things  what do these two lines mean in the above given error:

       

      Is it saying the the RTMManager-XmlAdapter-4.2.5.war is missing BRTManager-DataAccess-4.2.5.jar & RTMlink-DataAccess-4.2.5.jar which in turn are collectively missing Common-EJB-2.0.jar

      "jboss.module.resolve.phase.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main.2 is missing [jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.BRTManager-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMlink-DataAccess-4.2.5.jar\".main, jboss.module.spec.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.Common-EJB-2.0.jar\".main]",

      I do not want to go towards a global module. I might try it but would that be a bad of way of solving this.

      And what does this mean:

      ,"jboss.module.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main is missing [module.resolved.service.\"deployment.RTMManagerServices-ear-4.2.5.ear.RTMManager-XmlAdapter-4.2.5.war\".main]",

      the war is missing itself as a dependency?

       

      The difference i see in both is jboss.module.resolve.phase(ear.war) is missing jboss.module.spec.service(jar) is missing jboss.module.spec.service(Common-EJB-2.0.jar) and the other one is jboss.module.spec.service is missing : module.resolved.service. and I do not understand these notations.

        • 1. Re: missing dependency issues on multiple jars
          Nicklas Karlsson Master

          Could you show an exploded directory structure of the EAR as it is deployed?

          • 2. Re: missing dependency issues on multiple jars
            Syed Mahdi Apprentice

            Thanks for your reply Nicklas, That is very simple to answer. I have all the jars and the one war in the root of the ear. along with the library jars that it is complaining as well. Besides that I have a META-INF folder with

            • 3. Re: missing dependency issues on multiple jars
              sidde sivajyothi Newbie

              Hi did you resolve this issue? I am facing the same issue now. Could you please help me in resolving this.

              • 4. Re: missing dependency issues on multiple jars
                sidde sivajyothi Newbie

                Hi,

                ear structure is:

                lib

                meta-inf

                war

                jar 1

                jar 2

                jar 3 (none of the jars are ejb jars)

                 

                I have created jboss-deployment-structure.xml, created modules for the 3 jars and 1 war and even for lib

                "deployment.<<ear-name>>.ear.<<jar1>>.main.module.xml"

                I am not seeing any cause for the issue, so could not figure out why is this happening.

                 

                WFLYCTL0184:    New missing/unsatisfied dependencies:

                      service jboss.module.service."deployment.xxx.ear".main (missing) dependents: [service jboss.deployment.unit."xxx.ear".FIRST_MODULE_USE]

                      service jboss.module.service."deployment.xxx.ear.jar1.jar".main (missing) dependents: [service jboss.deployment.subunit."xxx.ear"."jar1.jar".FIRST_MODULE_USE]

                      service jboss.module.service."deployment.xxx.ear.jar2.jar".main (missing) dependents: [service jboss.deployment.subunit."xxx.ear"."jar2.jar".FIRST_MODULE_USE]

                      service jboss.module.service."deployment.xxx.ear.jar3.jar".main (missing) dependents: [service jboss.deployment.subunit."xxx.ear"."jar3.jar".FIRST_MODULE_USE]

                      service jboss.module.service."deployment.xxx.ear.war.customws.war".main (missing) dependents: [service jboss.deployment.subunit."xxx.ear"."customws.war".FIRST_MODULE_USE]

                      service jboss.module.spec.service."deployment.xxx.ear".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear".main]

                      service jboss.module.spec.service."deployment.xxx.ear.jar1.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear".main, service jboss.deployment.unit."xxx.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.xxx.ear.jar2.jar".main, service jboss.module.service."deployment.xxx.ear.jar3.jar".main, WFLYCTL0208: ... and 2 more ]

                      service jboss.module.spec.service."deployment.xxx.ear.jar2.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear".main, service jboss.deployment.unit."xxx.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.xxx.ear.jar2.jar".main]

                      service jboss.module.spec.service."deployment.xxx.ear.jar3.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear".main, service jboss.deployment.unit."xxx.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.xxx.ear.jar2.jar".main, service jboss.module.service."deployment.xxx.ear.jar3.jar".main, WFLYCTL0208: ... and 2 more ]

                      service jboss.module.spec.service."deployment.xxx.ear.customws.war".main (missing) dependents: [service jboss.module.resolve.phase."deployment.xxx.ear.jar3.jar".main.2, service jboss.module.service."deployment.xxx.ear".main, service jboss.module.resolve.phase."deployment.xxx.ear.war.customws.war".main.2, service jboss.module.resolve.phase."deployment.xxx.ear.jar1.jar".main.2, WFLYCTL0208: ... and 3 more ]

                      service jboss.module.spec.service."deployment.xxx.ear.war.customws.war".main (missing) dependents: [service jboss.deployment.unit."xxx.ear".FIRST_MODULE_USE, service jboss.module.service."deployment.xxx.ear.war.customws.war".main]

                      service module.resolved.service."deployment.xxx.ear".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear".main]

                      service module.resolved.service."deployment.xxx.ear.jar1.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear.jar1.jar".main]

                      service module.resolved.service."deployment.xxx.ear.jar2.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear.jar2.jar".main]

                      service module.resolved.service."deployment.xxx.ear.jar3.jar".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear.jar3.jar".main]

                      service module.resolved.service."deployment.xxx.ear.war.customws.war".main (missing) dependents: [service jboss.module.service."deployment.xxx.ear.war.customws.war".main]

                 

                Could not find answer any where. I am using wildfly 9.0.2 version.

                Any help would be highly appreciated.