title: New missing/unsatisfied dependencies ERROR in JBOSS
body: <p><strong>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:</strong></p>
  
  <p>00:04:58,073 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report</p>
  
  <p>JBAS014775:    New missing/unsatisfied dependencies:</p>
  
  <p>service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/PhoneBookDB] </p>
  
  <p><strong>Below you can see my persistence.xml, stanadlone.xml and module.xml. Am I missing some dependency in the module.xml?</strong></p>
  
  <p>persistence.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- JBoss, Home of Professional Open Source Copyright 2012, Red Hat, Inc. 
  and/or its affiliates, and individual contributors by the @authors tag. See 
  the copyright.txt in the distribution for a full listing of individual contributors. 
  Licensed under the Apache License, Version 2.0 (the "License"); you may not 
  use this file except in compliance with the License. You may obtain a copy 
  of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
  by applicable law or agreed to in writing, software distributed under the 
  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
  OF ANY KIND, either express or implied. See the License for the specific 
  language governing permissions and limitations under the License. --&gt;
  &lt;persistence version="2.0"
  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_2_0.xsd"&gt;
  &lt;persistence-unit name="primary"&gt;
      &lt;!-- If you are running in a production environment, add a managed 
          data source, this example data source is just for development and testing! --&gt;
      &lt;!-- The datasource is deployed as WEB-INF/greeter-quickstart-ds.xml, 
          you can find it in the source at src/main/webapp/WEB-INF/greeter-quickstart- ds.xml --&gt;
      &lt;jta-data-source&gt;java:jboss/datasources/PhoneBookDB&lt;/jta-data-source&gt;
      &lt;properties&gt;
          &lt;!-- Properties for Hibernate --&gt;
          &lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;
          &lt;property name="hibernate.show_sql" value="false" /&gt;
      &lt;/properties&gt;
   &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>module.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module xmlns="urn:jboss:module:1.0" name="com.mysql"&gt;
   &lt;resources&gt;
   &lt;resource-root path="mysql-connector-java-5.1.17-bin.jar"/&gt;
  &lt;/resources&gt;
  &lt;dependencies&gt;
  &lt;module name="javax.api"/&gt;
  &lt;module name="javax.transaction.api"/&gt;
  &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>standalone.xml:</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:1.0"&gt;
          &lt;datasources&gt;
              &lt;datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"&gt;
                  &lt;connection-url&gt;jdbc:h2:mem: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/PhoneBookDB" pool-name="PhoneBookDB" enabled="true" jta="true" use-java-context="true" use-ccm="true"&gt;
  &lt;connection-url&gt;jdbc:mysql://127.0.0.1:3306/PhoneBookDB&lt;/connection-url&gt;
  &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;
  &lt;driver&gt;com.mysql&lt;/driver&gt;
  &lt;security&gt;
      &lt;user-name&gt;root&lt;/user-name&gt;
      &lt;password&gt;123&lt;/password&gt;
  &lt;/security&gt;
  &lt;statement&gt;
      &lt;prepared-statement-cache-size&gt;
          100
      &lt;/prepared-statement-cache-size&gt;
      &lt;share-prepared-statements&gt;
          true
      &lt;/share-prepared-statements&gt;
   &lt;/statement&gt;
  &lt;/datasource&gt;
              &lt;drivers&gt;
                  &lt;driver name="com.mysql" module="com.mysql"&gt;
                  &lt;xa-datasource-class&gt;com.mysql.jdbc.Driver&lt;/xa-datasource-class&gt;
                  &lt;/driver&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;/drivers&gt;
          &lt;/datasources&gt;
      &lt;/subsystem&gt;
  </code></pre>
  
  <p><strong>Could someone tell me what am I doing wrong ?</strong></p>