10 Replies Latest reply on Nov 1, 2016 10:14 AM by Anna Leonenko

    How to fix "new missing/unsatisfied dependencies" (on Migration)

    Andreas Martin Newbie

      Hello everyone.

       

      As far as I am new to JBoss I am trying to fix a little problem while migrating (4.2 -> 7.1), which doesnt seam very spectacular, but I dont know what exactly to do.

      (The Application, which work on JBoss4.2 is using spring and struts.)

      In JBoss 7.1 I have created a database connection through the standalone.xml and tested it with empty project, just read a few columns from the DB - it works.

      Server Console tells me:

      14:51:29,676 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "fournisseurs_web_7.1.war"

      14:51:34,683 INFO  [org.jboss.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for punit

      14:51:37,403 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015856: Undeploy of deployment "fournisseurs_web_7.1.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"fournisseurs_web_7.1.war#punit\"jboss.naming.context.java.jboss.java:PostgresDSMissing[jboss.persistenceunit.\"fournisseurs_web_7.1.war#punit\"jboss.naming.context.java.jboss.java:PostgresDS]"]}

      14:51:37,554 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment fournisseurs_web_7.1.war in 473ms

      14:51:37,555 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.naming.context.java.jboss.java:PostgresDS (missing) dependents: [service jboss.persistenceunit."fournisseurs_web_7.1.war#punit"]

       

      14:51:37,557 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.persistenceunit.\"fournisseurs_web_7.1.war#punit\"jboss.naming.context.java.jboss.java:PostgresDSMissing[jboss.persistenceunit.\"fournisseurs_web_7.1.war#punit\"jboss.naming.context.java.jboss.java:PostgresDS]"]}}}

       

      And I have persistance.xml in resources/META-INF, which contains:

       

      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
              http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
          version="1.0">
          
      <!-- 
          <persistence-unit name="punit" transaction-type="JTA">
       -->
           <persistence-unit name="punit" transaction-type="RESOURCE_LOCAL">
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
      
              <non-jta-data-source>java:PostgresDS</non-jta-data-source>
      
              <!--<class>fournisseurs2.model.Fournisseur</class>-->
              
              <properties>
                  <property name="hibernate.hbm2ddl.auto" value="update" />
                  <property name="hibernate.show_sql" value="true" />
                  <property name="hibernate.format_sql" value="true" />
              </properties>
              
          </persistence-unit>
      

       

      I have tryed to create a new dependecy by creating a new file in WEB-INF named jboss-deployment-structure.xml, but I dont know what exactly i have to write there or whether its the right solution.

      Would be thankfull for every little hint

        • 1. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
          Tomaz Cerar Master

          Hi,

           

          from what it says in log it looks like it cannot find datasource named "java:PostgresDS" have you configured it?

          but be aware that jndi names of datasources have changed.

          can you post configuration of your datasource.

           

           

          --

          tomaz

          • 2. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
            Andreas Martin Newbie

            Thanks for the answer Tomaz Cerar.

            Here is the part of standalone.xml, where i configure DS:

             


            <datasource jndi-name="java:/postgresDS" pool-name="postgresDS" jta="false" use-ccm="false">

            <connection-url>

            jdbc:postgresql://192.168.*.*:5432/*****

            </connection-url>

            <driver-class>

            org.postgresql.Driver

            </driver-class>

            <driver>

            postgresql

            </driver>

            <pool>

            <min-pool-size>

            2

            </min-pool-size>

            <max-pool-size>

            20

            </max-pool-size>

            </pool>

            <security>

            <user-name>

            ****

            </user-name>

            <password>

            ****

            </password>

            </security>

            <validation>

            <validate-on-match>

            false

            </validate-on-match>

            <background-validation>

            false

            </background-validation>

            <background-validation-millis>

            0

            </background-validation-millis>

            </validation>

            <statement>

            <prepared-statement-cache-size>

            0

            </prepared-statement-cache-size>

            <share-prepared-statements>

            false

            </share-prepared-statements>

            </statement>

            </datasource>

            <drivers>

            <driver name="postgresql" module="org.postgresql">

            <xa-datasource-class>

            org.postgresql.xa.PGXADataSource

            </xa-datasource-class>

            </driver>

             

            I think in 4.2 the configuration was inside of the application. I found a struts property file, where are datascource IP, nickname and password saved:

             

            jdbc.driverClassName=org.postgresql.Driver

            jdbc.url=jdbc\:postgresql\://192.168.*.*\:5432/****

            jdbc.username=****

            jdbc.password=****

             

            (I have replaced some original signs with *, to hide them)

            • 3. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
              Tomaz Cerar Master

              hi,

               

              <datasource jndi-name="java:/postgresDS" pool-name="postgresDS" jta="false" use-ccm="false">

               

              jndi-name of your datasource is "java:/postgresDS"

              but in your persistence.xml your are referencing it as "java:PostgresDS" this must match

               

              btw, is there any special reason you are not using JTA?

               

              --

              tomaz

              1 of 1 people found this helpful
              • 4. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                Andreas Martin Newbie

                Thanks for the fast answer.

                I have edited persistence.xml and change the jndi name to java:/PostgresDS.

                 

                Now I have the error with dot instead of double dot:

                 

                JBAS014775:New missing/unsatisfied dependencies:

                service jboss.naming.context.java.PostgresDS (missing) dependents: [service jboss.persistenceunit."fournisseurs_web_7.1.war#punit"]

                 

                In last posting I forgot that the 4.2 Application had a configuration file in the server/deploy named postgres-ds.xml.

                But I am not sure what the application is using...

                 

                And I dont have any special reason not using JTA. I have no idea whats the difference.

                Its not my own application.

                • 5. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                  Tomaz Cerar Master

                  what does log says when it is deploying datasources..

                   

                  look for something like this:

                   

                  16:24:57,266 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 20) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

                  16:24:57,294 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 20) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)

                  16:24:57,350 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 20) JBAS010403: Deploying JDBC-compliant driver class com.inet.tds.TdsDriver (version 7.4)

                  16:24:57,350 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

                  16:24:58,159 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:/myApp/DS]

                  • 6. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                    Tomaz Cerar Master

                    also can you try adding use-java-context="true" to your datasource definition.

                    1 of 1 people found this helpful
                    • 7. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                      Andreas Martin Newbie

                      Thanks so far Tomaz Cerar.

                      I will try it some days on the coming week, then reply again.

                      • 8. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                        Andreas Martin Newbie

                        My DB-Driver is set up as a module and dont need to be deployed, server log says:

                        12:10:47,381 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/postgresDS]

                         

                        I have set: <datasource jndi-name="java:jboss/postgresDS" pool-name="postgresDS" enabled="true" jta="false" use-java-context="true" use-ccm="false">

                        And changed in persistence.xml the datasource to java:jboss/postgresDS and the error disappered.

                         

                        Thanks for help Tomaz Cerar.

                        • 9. Re: How to fix "new missing/unsatisfied dependencies" (on Migration)
                          carlos hilner f costa Newbie

                          I'm trying to deploy an application (clusterjsp) to a domain jboss eap6(AS7) and im getting this error:

                           

                          Unexpected HTTP response: 500

                           

                          Request

                          {

                              "operation" => "composite",

                              "address" => [],

                              "steps" => [

                                  {

                                      "address" => [

                                          ("server-group" => "adminclu01"),

                                          ("deployment" => "clusterjsp.war")

                                      ],

                                      "operation" => "add"

                                  },

                                  {

                                      "address" => [

                                          ("server-group" => "adminclu01"),

                                          ("deployment" => "clusterjsp.war")

                                      ],

                                      "operation" => "deploy"

                                  },

                                  {

                                      "address" => [

                                          ("server-group" => "other-server-group"),

                                          ("deployment" => "clusterjsp.war")

                                      ],

                                      "operation" => "add"

                                  },

                                  {

                                      "address" => [

                                          ("server-group" => "other-server-group"),

                                          ("deployment" => "clusterjsp.war")

                                      ],

                                      "operation" => "deploy"

                                  }

                              ]

                          }

                           

                          Response

                           

                          Internal Server Error

                          {

                              "outcome" => "failed",

                              "result" => {

                                  "step-1" => {"outcome" => "success"},

                                  "step-2" => {"outcome" => "success"},

                                  "step-3" => {"outcome" => "success"},

                                  "step-4" => {"outcome" => "success"}

                              },

                              "failure-description" => "JBAS014654: A operação de composição foi revertida",

                              "rolled-back" => true,

                              "server-groups" => {

                                  "adminclu01" => {"host" => {"master" => {"master-inst03" => {"response" => {

                                      "outcome" => "failed",

                                      "result" => {

                                          "step-1" => {

                                              "outcome" => "failed",

                                              "rolled-back" => true

                                          },

                                          "step-2" => {

                                              "outcome" => "failed",

                                              "failure-description" => {"JBAS014771: Os serviços com falta/indisponibilidade de dependências " => [

                                                  "jboss.infinispan.web.default-host/clusterjsp.config Faltam[JBAS014861: ]",

                                                  "jboss.web.deployment.default-host./clusterjsp.session Faltam[JBAS014861: ]",

                                                  "jboss.infinispan.web.default-host/clusterjsp Faltam[JBAS014861: ]",

                                                  "jboss.naming.context.java.module.clusterjsp.clusterjsp.ORB Faltam[JBAS014861: ]",

                                                  "jboss.web.deployment.default-host./clusterjsp Faltam[JBAS014861: ]",

                                                  "jboss.deployment.unit.\"clusterjsp.war\".jboss.security.jacc Faltam[JBAS014861: ]"

                                              ]},

                                              "rolled-back" => true

                                          }

                                      },

                                      "failure-description" => {"JBAS014653: A operação de composição falhou e foi revertida. Segue abaixo as etapas que falharam:" => {"Operação step-2" => {"JBAS014771: Os serviços com falta/indisponibilidade de dependências " => [

                                          "jboss.infinispan.web.default-host/clusterjsp.config Faltam[JBAS014861: ]",

                                          "jboss.web.deployment.default-host./clusterjsp.session Faltam[JBAS014861: ]",

                                          "jboss.infinispan.web.default-host/clusterjsp Faltam[JBAS014861: ]",

                                          "jboss.naming.context.java.module.clusterjsp.clusterjsp.ORB Faltam[JBAS014861: ]",

                                          "jboss.web.deployment.default-host./clusterjsp Faltam[JBAS014861: ]",

                                          "jboss.deployment.unit.\"clusterjsp.war\".jboss.security.jacc Faltam[JBAS014861: ]"

                                      ]}}},

                                      "rolled-back" => true

                                  }}}}},

                                  "other-server-group" => {"host" => {"master" => {"master-inst05" => {"response" => {

                                      "outcome" => "failed",

                                      "result" => {

                                          "step-1" => {

                                              "outcome" => "failed",

                                              "rolled-back" => true

                                          },

                                          "step-2" => {

                                              "outcome" => "failed",

                                              "rolled-back" => true

                                          }

                                      },

                                      "failure-description" => "JBAS014654: A operação de composição foi revertida",

                                      "rolled-back" => true

                                  }}}}}

                              }

                          }