title: Adding a module in WildFly 8.2.0 Final release
body: <p>I am new in JBoss and I try to add a jdbc driver for derby as a module in WidlFly 8.2.0.</p>
  
  <p>What I did:  </p>
  
  <ul>
  <li>I added the org/apache/derby/main folder in the JBOSS_HOME/modules/system/layers/base directory</li>
  <li>In this new folder, I added derbyclient.jar (from jdk 1.8.0_40, it contains the driver) and a new <code>module.xml</code> file.</li>
  </ul>
  
  <p>The <code>module.xml</code> file is as follows:   </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;module xmlns="urn:jboss:module:1.0" name="org.apache.derby"&gt;
       &lt;resources&gt;
           &lt;resource-root path="derbyclient.jar"/&gt;
       &lt;/resources&gt;
       &lt;dependencies&gt;
           &lt;module name="javax.api"/&gt;
       &lt;/dependencies&gt;
   &lt;/module&gt;
  </code></pre>
  
  <p>Then, I updated the <code>standalone.xml</code> file as follows:</p>
  
  <ul>
  <li>addition of this tag (in <code>&lt;extensions&gt;</code>): <code>&lt;extension module="org.apache.derby"/&gt;</code></li>
  </ul>
  
  <p>Declaration of my datasource and of the driver: </p>
  
  <pre><code>&lt;datasource jndi-name="java:/DerbyDS" pool-name="DerbyDS" enabled="true" use-ccm="false"&gt;
      &lt;connection-url&gt;jdbc:derby:MyDB;create=true&lt;/connection-url&gt;
      &lt;driver&gt;org.apache.derby&lt;/driver&gt;
      &lt;security&gt;
          &lt;user-name&gt;demo&lt;/user-name&gt;
           &lt;password&gt;demo&lt;/password&gt;
      &lt;/security&gt;
      &lt;validation&gt;
          &lt;validate-on-match&gt;false&lt;/validate-on-match&gt;
          &lt;background-validation&gt;false&lt;/background-validation&gt;
      &lt;/validation&gt;
      &lt;statement&gt;
          &lt;share-prepared-statements&gt;false&lt;/share-prepared-statements&gt;
      &lt;/statement&gt;
  &lt;/datasource&gt;
  &lt;drivers&gt;
      &lt;driver name="org.apache.derby" module="org.apache.derby"&gt;
          &lt;xa-datasource-class&gt;org.apache.derby.jdbc.ClientXADataSource&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;
  </code></pre>
  
  <p>I am getting the following error when I start <code>WildFly</code>:</p>
  
  <pre><code>`16:19:49,856 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "datasources"),
      ("data-source" =&gt; "DerbyDS")
  ]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" =&gt; [
      "jboss.data-source.java:/DerbyDS is missing [jboss.jdbc-driver.org_apache_derby]",
      "jboss.driver-demander.java:/DerbyDS is missing [jboss.jdbc-driver.org_apache_derby]"
  ]}
  16:19:49,866 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "datasources"),
      ("data-source" =&gt; "DerbyDS")
  ]) - failure description: {
      "JBAS014771: Services with missing/unavailable dependencies" =&gt; [
          "jboss.data-source.java:/DerbyDS is missing [jboss.jdbc-driver.org_apache_derby]",
          "jboss.driver-demander.java:/DerbyDS is missing [jboss.jdbc-driver.org_apache_derby]"
      ],
      "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." =&gt; {
          "Services that were unable to start:" =&gt; [
              "jboss.data-source.reference-factory.DerbyDS",
              "jboss.naming.context.java.DerbyDS"
          ],
          "Services that may be the cause:" =&gt; ["jboss.jdbc-driver.org_apache_derby"]
      }
  }
  16:19:49,897 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "MyApp.ear" (runtime-name : "MyApp.ear")
  16:19:49,897 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "MyApp2.ear" (runtime-name : "MyApp2.ear")
  16:19:49,907 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
  JBAS014775:    New missing/unsatisfied dependencies:
        service jboss.jdbc-driver.org_apache_derby (missing) dependents: [service jboss.driver-demander.java:/DerbyDS, service jboss.data-source.java:/DerbyDS]`
  </code></pre>
  
  <p>Do you know what I did wrong? </p>
  
  <p>Thanks in advance</p>