title: Unable to install/run SQL Server driver in WildFly 10
body: <p>I am running my application on a WildFly 10 server. I do not wish to place my connection details on my application src codes thus am trying to place it inside WildFly 10 server itself. </p>
  
  <p>However I am facing issues.</p>
  
  <p>Under <code>[WILDFLY_HOME]\modules\system\layers\base\com\microsoft</code>, 
  I created the following directory <code>sqlserver\main</code> and I place my JAR file and my XML file inside the main folder.</p>
  
  <p>The JAR that I am using is <code>sqljdbc.jar</code>. </p>
  
  <p><strong>module.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- JDBC Drivers module.xml file to configure your JDBC drivers--&gt;
  
  &lt;!-- SQL Server 2014 example --&gt;
  &lt;module xmlns="urn:jboss:module:1.3" name="com.microsoft.sqlserver"&gt;
    &lt;resources&gt;
      &lt;resource-root path="sqljdbc.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>Next under <code>[WILDFLY_HOME]\standalone\configuration</code>, I modified the <code>standalone.xml</code>. Under the subsystem datasource section, I add the details for SQL Server.</p>
  
  <p><strong>standalone.xml:</strong></p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:4.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;DB_CLOSE_ON_EXIT=FALSE&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:/TestDS" pool-name="TestDS" enabled="true" use-java-context="true"&gt;
              &lt;connection-url&gt;jdbc:sqlserver://localhost\test:1433;databaseName=test&lt;/connection-url&gt;
              &lt;driver&gt;mssql&lt;/driver&gt;
              &lt;security&gt;
                  &lt;user-name&gt;sa&lt;/user-name&gt;
                  &lt;password&gt;Password123!&lt;/password&gt;
              &lt;/security&gt;
              &lt;pool&gt;
                  &lt;min-pool-size&gt;5&lt;/min-pool-size&gt;
                  &lt;max-pool-size&gt;50&lt;/max-pool-size&gt;
                  &lt;prefill&gt;false&lt;/prefill&gt;
                  &lt;use-strict-min&gt;false&lt;/use-strict-min&gt;
                  &lt;flush-strategy&gt;FailingConnectionOnly&lt;/flush-strategy&gt;
              &lt;/pool&gt;
              &lt;validation&gt;
                  &lt;valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"&gt;&lt;/valid-connection-checker&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="mssql" module="com.microsoft.sqlserver"&gt;
                  &lt;xa-datasource-class&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/xa-datasource-class&gt;
              &lt;/driver&gt;
          &lt;/drivers&gt;
      &lt;/datasources&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>The error that I am facing now is as per below when I start running my WildFly:</p>
  
  <pre><code>15:19:51,098 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "datasources"),
      ("data-source" =&gt; "TestDS")
  ]) - failure description: {
      "WFLYCTL0412: Required services that are not installed:" =&gt; [
          "jboss.jdbc-driver.mssql",
          "jboss.jdbc-driver.mssql"
      ],
      "WFLYCTL0180: Services with missing/unavailable dependencies" =&gt; [
          "org.wildfly.data-source.TestDS is missing [jboss.jdbc-driver.mssql]",
          "jboss.driver-demander.java:/TestDS is missing [jboss.jdbc-driver.mssql]",
          "org.wildfly.data-source.TestDS is missing [jboss.jdbc-driver.mssql]"
      ]
  }
  15:19:51,120 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
  WFLYCTL0184:    New missing/unsatisfied dependencies:
        service jboss.jdbc-driver.mssql (missing) dependents: [service org.wildfly.data-source.TestDS, service jboss.driver-demander.java:/TestDS]
  </code></pre>