title: Configure jt400 xa-datasource in JBoss EAP 7 standalone.xml
body: <p>I have as400 driver file (jt400.jar) in c:\jboss-EAP7\modules\com\ibm\main\ with the corresponding module.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module xmlns="urn:jboss:module:1.1" name="com.ibm"&gt;
      &lt;resources&gt;
          &lt;resource-root path="jt400.jar"/&gt;
      &lt;/resources&gt;
      &lt;dependencies&gt;
          &lt;module name="javax.api"/&gt;
          &lt;module name="javax.transaction.api"/&gt;
          &lt;module name="javax.servlet.api" optional="true"/&gt;
      &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>Here is the datasource configuration in my standalone.xml:</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:4.0"&gt;
              &lt;datasources&gt;
                  &lt;xa-datasource jndi-name="java:/ds/DB2DataSource" pool-name="ds/DB2DataSource" enabled="true" use-java-context="true" use-ccm="true"&gt; 
                      &lt;xa-datasource-property name="ServerName"&gt;
                          xxx.xx.xxx.x
                      &lt;/xa-datasource-property&gt;
                      &lt;driver&gt;as400&lt;/driver&gt;
                      &lt;xa-pool&gt;
                          &lt;is-same-rm-override&gt;false&lt;/is-same-rm-override&gt;
                          &lt;no-tx-separate-pools&gt;true&lt;/no-tx-separate-pools&gt;
                          &lt;interleaving&gt;false&lt;/interleaving&gt;
                          &lt;pad-xid&gt;false&lt;/pad-xid&gt;
                          &lt;wrap-xa-resource&gt;false&lt;/wrap-xa-resource&gt;
                      &lt;/xa-pool&gt;                       
                      &lt;security&gt;
                          &lt;user-name&gt;user&lt;/user-name&gt;
                          &lt;password&gt;pass&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;/xa-datasource&gt;
                  &lt;drivers&gt;
                     &lt;driver name="as400" module="com.ibm"&gt;
                          &lt;xa-datasource-class&gt;com.ibm.as400.access.AS400JDBCXADataSource&lt;/xa-datasource-class&gt;
                      &lt;/driver&gt;
                  &lt;/drivers&gt;
              &lt;/datasources&gt;
          &lt;/subsystem&gt;
  </code></pre>
  
  <p>I have the following problem in the datasource binding:</p>
  
  <pre><code>15:44:00,482 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "datasources"),
      ("xa-data-source" =&gt; "ds/DB2DataSource")
  ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" =&gt; [
      "jboss.driver-demander.java:/ds/DB2DataSource is missing [jboss.jdbc-driver.as400]",
      "org.wildfly.data-source.ds/DB2DataSource is missing [jboss.jdbc-driver.as400]"
  ]}
  15:44:00,485 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "datasources"),
      ("xa-data-source" =&gt; "ds/DB2DataSource")
  ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" =&gt; [
      "jboss.driver-demander.java:/ds/DB2DataSource is missing [jboss.jdbc-driver.as400]",
      "org.wildfly.data-source.ds/DB2DataSource is missing [jboss.jdbc-driver.as400]",
      "org.wildfly.data-source.ds/DB2DataSource is missing [jboss.jdbc-driver.as400]"
  ]}
  </code></pre>
  
  <p>What am I doing wrong?
  Please note that the connection is successful with the same parameters when using a SQLClient (e.g. DBeaver).</p>
  
  <p>Thanks</p>