title: ERROR New missing/unsatisfied dependencies: (Cannot configure datasource)
body: <p>I have a web app using JSF(Primefaces), JPA(Hibernate) and EJBs and have trouble to configure the data source on JBoss . I am getting the following error:</p>
  
  <pre><code>2012/10/31 07:20:17,948 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
  
  2012/10/31 07:20:18,836 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ROOT.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" =&gt; ["jboss.persistenceunit.\"ROOT.war#test\"jboss.naming.context.java.jboss.datasources.MysqlDSMissing[jboss.persistenceunit.\"ROOT.war#test\"jboss.naming.context.java.jboss.datasources.MysqlDS]"]}
  
  2012/10/31 07:20:19,252 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment ROOT.war in 413ms
  
  2012/10/31 07:20:19,255 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
  
  JBAS014775:    New missing/unsatisfied dependencies:
  
        service jboss.naming.context.java.jboss.datasources.MysqlDS (missing) dependents: [service jboss.persistenceunit."ROOT.war#test"]
  
  2012/10/31 07:20:19,334 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" =&gt; {"Operation step-2" =&gt; {"JBAS014771: Services with missing/unavailable dependencies" =&gt; ["jboss.persistenceunit.\"ROOT.war#test\"jboss.naming.context.java.jboss.datasources.MysqlDSMissing[jboss.persistenceunit.\"ROOT.war#test\"jboss.naming.context.java.jboss.datasources.MysqlDS]"]}}}
  </code></pre>
  
  <p>Below you can see my <code>persistence.xml</code>, <code>stanadlone.xml</code> and <code>pom.xml</code>.  <strong>Am I missing some dependency in the pom.xml?</strong></p>
  
  <p>Persistence.xml</p>
  
  <p></p>
  
  <p></p>
  
  <pre><code>   &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt; 
  
  &lt;jta-data-source&gt;java:jboss/datasources/MysqlDS&lt;/jta-data-source&gt; 
  
  &lt;properties&gt;
  
    &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt;    
  
    &lt;property name="hibernate.show_sql" value="true"/&gt;
  
    &lt;property name="hibernate.max_fetch_depth" value="3"/&gt;
  
    &lt;property name="hibernate.hbm2ddl.auto" value="update" /&gt;
  
  &lt;/properties&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>Standalone.xml</p>
  
  <pre><code>&lt;datasources&gt;
              &lt;datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS"&gt;
                  &lt;connection-url&gt;jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1&lt;/connection-url&gt;
                  &lt;driver&gt;h2&lt;/driver&gt;
              &lt;security&gt;
                      &lt;user-name&gt;sa&lt;/user-name&gt;
                      &lt;password&gt;sa&lt;/password&gt;
                  &lt;/security&gt;
              &lt;/datasource&gt;
              &lt;datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS"&gt;
                  &lt;connection-url&gt;jdbc:mysql://127.5.54.1:3306/researchprojects&lt;/connection-url&gt;
                  &lt;driver&gt;mysql&lt;/driver&gt;
                  &lt;security&gt;
                    &lt;user-name&gt;admin&lt;/user-name&gt;
                    &lt;password&gt;*******&lt;/password&gt;
                  &lt;/security&gt;
                  &lt;validation&gt;
                    &lt;check-valid-connection-sql&gt;SELECT 1&lt;/check-valid-connection-sql&gt;
                  &lt;/validation&gt;
              &lt;/datasource&gt;
              &lt;datasource jndi-name="java:jboss/datasources/PostgreSQLDS" enabled="${postgresql.enabled}" use-java-context="true" pool-name="PostgreSQLDS" use-ccm="true"&gt;
                  &lt;connection-url&gt;jdbc:postgresql://${env.OPENSHIFT_DB_HOST}:${env.OPENSHIFT_DB_PORT}/${env.OPENSHIFT_APP_NAME}&lt;/connection-url&gt;
                  &lt;driver&gt;postgresql&lt;/driver&gt;
                  &lt;security&gt;
                    &lt;user-name&gt;${env.OPENSHIFT_DB_USERNAME}&lt;/user-name&gt;
                    &lt;password&gt;${env.OPENSHIFT_DB_PASSWORD}&lt;/password&gt;
                  &lt;/security&gt;
                  &lt;validation&gt;
                    &lt;check-valid-connection-sql&gt;SELECT 1&lt;/check-valid-connection-sql&gt;
                  &lt;/validation&gt;
              &lt;/datasource&gt;
              &lt;drivers&gt;
                  &lt;driver name="h2" module="com.h2database.h2"&gt;
                      &lt;xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource&lt;/xa-datasource-class&gt;
                  &lt;/driver&gt;
                  &lt;driver name="mysql" module="com.mysql.jdbc"&gt;
                      &lt;xa-datasource-class&gt;com.mysql.jdbc.jdbc2.optional.MysqlXADataSource&lt;/xa-datasource-class&gt;
                  &lt;/driver&gt;
                  &lt;driver name="postgresql" module="org.postgresql.jdbc"&gt;
                      &lt;xa-datasource-class&gt;org.postgresql.xa.PGXADataSource&lt;/xa-datasource-class&gt;
                  &lt;/driver&gt;
              &lt;/drivers&gt;
          &lt;/datasources&gt; 
  </code></pre>
  
  <p>Pom.xml</p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;openshifttest&lt;/groupId&gt;
    &lt;artifactId&gt;openshifttest&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;name&gt;openshifttest&lt;/name&gt;
  
   &lt;repositories&gt;
    &lt;repository&gt;
          &lt;id&gt;scala&lt;/id&gt;
          &lt;name&gt;Scala Tools&lt;/name&gt;
          &lt;url&gt;http://scala-tools.org/repo-releases/&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
    &lt;repository&gt;  
      &lt;id&gt;prime-repo&lt;/id&gt;  
      &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;  
      &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;  
      &lt;layout&gt;default&lt;/layout&gt;  
      &lt;/repository&gt;
  &lt;/repositories&gt;   
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;scala&lt;/id&gt;
              &lt;name&gt;Scala Tools&lt;/name&gt;
              &lt;url&gt;http://scala-tools.org/repo-releases/&lt;/url&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/releases&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;maven.compiler.source&gt;1.6&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.6&lt;/maven.compiler.target&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.spec&lt;/groupId&gt;
        &lt;artifactId&gt;jboss-javaee-6.0&lt;/artifactId&gt;
        &lt;version&gt;1.0.0.Final&lt;/version&gt;
        &lt;type&gt;pom&lt;/type&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-library&lt;/artifactId&gt;
          &lt;version&gt;2.7.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;  
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;  
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;  
          &lt;version&gt;3.4.1&lt;/version&gt;  
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
    &lt;profiles&gt;
      &lt;profile&gt;
       &lt;!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. --&gt;
       &lt;!-- Use this profile for any OpenShift specific customization your app will need. --&gt;
       &lt;!-- By default that is to put the resulting archive into the 'deployments' folder. --&gt;
       &lt;!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html --&gt;
       &lt;id&gt;openshift&lt;/id&gt;
       &lt;build&gt;
          &lt;finalName&gt;openshifttest&lt;/finalName&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1.1&lt;/version&gt;
              &lt;configuration&gt;
                &lt;outputDirectory&gt;deployments&lt;/outputDirectory&gt;
                &lt;warName&gt;ROOT&lt;/warName&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                  &lt;groupId&gt;org.scala-tools&lt;/groupId&gt;
                 &lt;artifactId&gt;maven-scala-plugin&lt;/artifactId&gt;
  
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;compile&lt;/id&gt;
                          &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;/execution&gt;
  
                      &lt;execution&gt;
                          &lt;id&gt;test-compile&lt;/id&gt;
                          &lt;goals&gt;
                          &lt;goal&gt;testCompile&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;phase&gt;test-compile&lt;/phase&gt;
                      &lt;/execution&gt;
  
                      &lt;execution&gt;
                          &lt;phase&gt;process-resources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Could someone tell me what am I doing wrong ?</strong> </p>