3 Replies Latest reply on Jul 25, 2013 12:16 PM by Frank Langelage

    "Services with missing/unavailable dependencies" for ear/lib jars

    Filippo Dalla Gassa Newbie

      Hi all. I'm porting an application from JBoss 4.2 to JBoss 7.1 on behalf of the company for which I work. I'm trying to deploy the application as standalone. The application is an exploded ear with the following structure (results of jar tf):

       

      META-INF/

      META-INF/MANIFEST.MF

      META-INF/application.xml

      lib/

      lib/acegi-security-1.0.6.jar

      lib/acegi-security-tiger-1.0.6.jar

      lib/activation-1.1.jar

      lib/amqp-client-2.8.7.jar

      lib/antlr-2.7.6.jar

      lib/aopalliance-1.0.jar

      lib/asm-2.2.2.jar

      lib/asm-attrs-1.5.3.jar

      lib/asm-commons-2.2.2.jar

      lib/aspectjrt-1.5.1a.jar

      lib/aspectjweaver-1.5.1a.jar

      lib/axis-1.4.jar

      lib/axis-jaxrpc-1.4.jar

      lib/axis-saaj-1.4.jar

      lib/axis-wsdl4j-1.5.1.jar

      lib/backport-util-concurrent-3.0.jar

      lib/cglib-nodep-2.1_3.jar

      lib/cognos-axis-8.0.jar

      lib/cognos-client-8.0.jar

      lib/commons-attributes-api-2.1.jar

      lib/commons-attributes-compiler-2.1.ja

      lib/commons-beanutils-1.6.1.jar

      lib/commons-cli-1.2.jar

      lib/commons-collections-3.2.jar

      lib/commons-dbcp-1.2.1.jar

      lib/commons-digester-1.8.jar

      lib/commons-discovery-0.2.jar

      lib/commons-el-1.0.jar

      lib/commons-lang-2.1.jar

      lib/commons-pool-1.3.jar

      lib/ehcache-1.3.0.jar

      lib/geronimo-jta_1.0.1B_spec-1.0.1.jar

      lib/groovy-1.6-beta-1.jar

      lib/hibernate-3.2.0.cr2.jar

      lib/hibernate-core-3.3.0.SP1.jar

      lib/jamonapi-2.2.jar

      lib/jcl104-over-slf4j-1.3.1.jar

      lib/jep-2.4.0.jar

      lib/jsr107cache-1.0.jar

      lib/jug-2.0.0-asl.jar

      lib/junit-3.8.1.jar

      lib/ldapbp-1.2.4.jar

      lib/log4j-1.2.9.jar

      lib/mail-1.4.jar

      lib/mockito-all-1.9.0.jar

      lib/mockobjects-core-0.09.jar

      lib/mule-core-1.4.1.jar

      lib/mule-module-builders-1.4.1.jar

      lib/mule-module-management-1.4.1.jar

      lib/mule-module-spring-1.4.1.jar

      lib/mule-transport-tcp-1.4.1.jar

      lib/mule-transport-vm-1.4.1.jar

      lib/mvclient-10.2.0.jar

      lib/opencsv-2.1.jar

      lib/oro-2.0.8.jar

      lib/protobuf-java-2.3.0.jar

      lib/quartz-1.5.2.jar

      lib/slf4j-api-1.4.2.jar

      lib/slf4j-log4j12-1.3.1.jar

      lib/snmp-5_1.jar

      lib/spring-aop-2.5.1.jar

      lib/spring-beans-2.5.1.jar

      lib/spring-context-2.5.1.jar

      lib/spring-context-support-2.5.1.jar

      lib/spring-core-2.5.1.jar

      lib/spring-jdbc-2.5.1.jar

      lib/spring-ldap-1.1.2.jar

      lib/spring-orm-2.5.1.jar

      lib/spring-test-2.5.1.jar

      lib/spring-tx-2.5.1.jar

      lib/spring-web-2.5.1.jar

      lib/spring-webmvc-2.5.1.jar

      lib/testng-5.8-jdk15.jar

      lib/xmlpull-1.1.3.1.jar

      lib/xpp3_min-1.1.4c.jar

      lib/xstream-1.4.3.jar

      alarmServices-v6.13.2.1b1_PR.jar

      caServices-v6.13.2.1b1_PR.jar

      commonServices-v6.13.2.1b1_PR.jar

      coreFramework-v6.13.2.1b1_PR.jar

      esbServices-v6.13.2.1b1_PR.jar

      naServices-v6.13.2.1b1_PR.jar

      saServices-v6.13.2.1b1_PR.jar

      trw-transport-snmp-v6.13.2.1b1_PR.jar

      userExport-v6.13.2.1b1_PR.jar

      uumNotification-v6.13.2.1b1_PR.jar

      uaWeb.war

       

       

      When I start the server the deployment fails and in the .failed file I have the following message:

       

      {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"uaEar.ear\".PARSEjboss.deployment.subunit.\"uaEar.ear\".\"lib/spring-context-2.5.1.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/spring-ldap-1.1.2.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/axis-saaj-1.4.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/aspectjrt-1.5.1a.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/mule-transport-vm-1.4.1.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/commons-collections-3.2.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/spring-beans-2.5.1.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/hibernate-3.2.0.cr2.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/spring-orm-2.5.1.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/mule-core-1.4.1.jar\".STRUCTURE, jboss.deployment.subunit.\"uaEar.ear\".\"lib/axis-jaxrpc-1.4.jar\".STRUCTURE, .........

       

      The complete message is in the attached file, but summarizing it seems that it needs some dependencies for all jars under ear/lib directory. Am I interpreting this message the right way? How can I solve this dependencies issue? How can I solve this problem using the jboss-deployment-structure.xml file (is it sufficient to use informations from tattletale report and insert them into the file or not)?

       

      Any help would be really appreciated.

       

      Thanks

      Filippo

        • 1. Re: "Services with missing/unavailable dependencies" for ear/lib jars
          Stephen Coy Master

          You have a few problems here.

          1. You must upgrade Spring Framework to 3.0.3 or newer. Versions between 2.5 and 3.0.2 do not work on JBossAS 5.x, 6.x or 7.x
          2. I think AS7.x only supports Hibernate 3.5 or newer
          3. You should remove the following jars, as the services they provide are provided by JBoss (and all other vendor's as well):
            1. activation-1.1.jar
            2. geronimo-jta_1.0.1B_spec-1.0.1.jar
            3. mail-1.4.jar
            4. xstream-1.4.3.jar
            5. I think the axis jars may be problematical as well.

           

          In theory JBoss will actually ignore these while they're in the EAR, but if any exist also in your WAR files then they may cause problems.

          • 2. Re: "Services with missing/unavailable dependencies" for ear/lib jars
            Filippo Dalla Gassa Newbie

            Hi. Trying to understand the root of the problem I have created a minimal POC with the same structure of our company project, but only one dependency.

             

            This is the structure of the POC (all is within an .ear)

             

            META-INF/

            META-INF/MANIFEST.MF

            META-INF/application.xml

            lib/

            lib/commons-collections-3.2.jar

            helloWeb.war

             

            Basically is a simple hello world example. The content of the application.xml is the following:

             

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

            <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">

              <description>HelloWorld Project</description>

              <display-name>HelloWorld</display-name>

              <initialize-in-order>true</initialize-in-order>

              <module>

                <java>lib/commons-collections-3.2.jar</java>

              </module>

              <module>

                <web>

                  <web-uri>helloWeb.war</web-uri>

                  <context-root>/hello</context-root>

                </web>

              </module>

            </application>

             

            When I go to deploy the application this is the result:

             

            15:34:27,354 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

            15:34:27,660 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

            15:34:27,711 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

            15:34:28,687 INFO  [org.xnio] XNIO Version 3.0.3.GA

            15:34:28,689 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

            15:34:28,696 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

            15:34:28,704 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

            15:34:28,733 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

            15:34:28,744 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

            15:34:28,808 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

            15:34:28,830 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

            15:34:28,839 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

            15:34:28,878 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

            15:34:28,903 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

            15:34:28,905 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

            15:34:28,973 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final

            15:34:29,018 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

            15:34:29,052 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

            15:34:29,309 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]

            15:34:29,330 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080

            15:34:29,467 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA

            15:34:29,653 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final-POC\standalone\deployments

            15:34:29,657 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on localhost/127.0.0.1:4447

            15:34:29,680 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found helloEar.ear in deployment directory. To trigger deployment create a file called helloEar.ear.dodeploy

            15:34:29,707 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

            15:34:29,711 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999

            15:34:29,875 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "helloEar.ear"

            15:34:30,113 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "helloWeb.war"

            15:34:30,113 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "lib/commons-collections-3.2.jar"

            15:34:30,122 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990

            15:34:30,122 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 3184ms - Started 140 of 218 services (3 services failed or missing dependencies, 74 services are passive or on-demand)

            15:34:30,324 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "helloEar.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"helloEar.ear\".PARSEjboss.deployment.subunit.\"helloEar.ear\".\"lib/commons-collections-3.2.jar\".STRUCTUREMissing[jboss.deployment.unit.\"helloEar.ear\".PARSEjboss.deployment.subunit.\"helloEar.ear\".\"lib/commons-collections-3.2.jar\".STRUCTURE]"]}

            15:34:30,326 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment helloWeb.war in 2ms

            15:34:30,327 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment lib/commons-collections-3.2.jar in 3ms

            15:34:30,330 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment helloEar.ear in 7ms

            15:34:30,332 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

            JBAS014775:    New missing/unsatisfied dependencies:

                  service jboss.deployment.subunit."helloEar.ear"."lib/commons-collections-3.2.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."helloEar.ear".PARSE]

             

             

            15:34:30,335 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"helloEar.ear\".PARSEjboss.deployment.subunit.\"helloEar.ear\".\"lib/commons-collections-3.2.jar\".STRUCTUREMissing[jboss.deployment.unit.\"helloEar.ear\".PARSEjboss.deployment.subunit.\"helloEar.ear\".\"lib/commons-collections-3.2.jar\".STRUCTURE]"]}}}

             

             

            What type of dependency is involved since it does not seem that "commons-collections-3.2.jar" library requires any dependency?

            • 3. Re: "Services with missing/unavailable dependencies" for ear/lib jars
              Frank Langelage Master

              commons-collections is only a library. Spo put it into the lib folder as you have, but do not reference it as a module in application.xml.

              Increase version of application.xml to 6 and specify lib as the library folder, just for clarification. Not needed, as it is the standard name.