title: How do i set up datasource on Jboss 6 EAP for as400 db2?
body: <p>I am trying to setup a jboss 6.3 data-source to an ibm as400</p>
  
  <p>jboss 6.3 is running on a windows server 2012 VM
  java 1.8.0_31 64 bit</p>
  
  <p>i am getting this error in the console on start up of jboss</p>
  
  <p>1</p>
  
  <blockquote>
    <p>4:02:09,332 INFO  [org.jboss.as.controller] (Controller Boot Thread)
    JBAS014774: Service status report JBAS014775:    New
    missing/unsatisfied dependencies:
          service jboss.jdbc-driver.as400 (missing) dependents: [service jboss.driver-demander.java:jboss/datasour ces/PPSDB, service
    jboss.data-source.java:jboss/datasources/PPSDB]</p>
  </blockquote>
  
  <p>this is my module.xml i have it and the driver jt400.jar in</p>
  
  <p>D:\Program Files\jboss-eap-6.3\modules\com\ibm\as400\main</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;module xmlns="urn:jboss:module:1.0" name="com.ibm.as400"&gt;      
  &lt;resources&gt;
  &lt;resource-root path="jt400.jar"/&gt;
  &lt;/resources&gt;
  &lt;dependencies&gt;
  &lt;module name="javax.api"/&gt;
  &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>This is the datasource subsystem from my Standalone.xml</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:1.1"&gt;
  &lt;datasources&gt;
    &lt;datasource jndi-name="java:jboss/datasources/PPSDB" pool-name="java:jboss/datasources/PPSDB_Pool" enabled="true" use-java-context="true" use-ccm="true"&gt; 
       &lt;connection-url&gt;jdbc:as400://development.ad.company.com/JKCDRIVER;DB_CLOSE_DELAY=-1&lt;/connection-url&gt;
       &lt;driver-class&gt;com.ibm.as400.access.AS400JDBCDriver&lt;/driver-class&gt;
       &lt;driver&gt;as400&lt;/driver&gt;
         &lt;pool&gt;
          &lt;min-pool-size&gt;2&lt;/min-pool-size&gt;
          &lt;max-pool-size&gt;20&lt;/max-pool-size&gt;
          &lt;prefill&gt;true&lt;/prefill&gt;
       &lt;/pool&gt;
       &lt;security&gt;
          &lt;user-name&gt;user&lt;/user-name&gt;
          &lt;password&gt;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;validate-on-match&gt;false&lt;/validate-on-match&gt;
          &lt;background-validation&gt;false&lt;/background-validation&gt;
          &lt;use-fast-fail&gt;false&lt;/use-fast-fail&gt;
       &lt;/validation&gt;
  
  
    &lt;/datasource&gt;
      &lt;drivers&gt;
         &lt;driver name="as400" module="com.ibm.as400"/&gt;
    &lt;/drivers&gt;
  &lt;/datasources&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>i have found a few different examples for setting up an as400 data-source on old versions of jboss, but the tags seem to have changed, and i have not been able to figure out how to get this working
  <a href="https://developer.jboss.org/wiki/SetUpADB2Datasource" rel="nofollow">https://developer.jboss.org/wiki/SetUpADB2Datasource</a></p>
  
  <p>any help would be greatly appreciated</p>
  
  <hr>
  
  <p>I moved the driver-class tag inside the driver tag like suggested in the answer below,  removed the data source from the standalone.xml, then using the jboss web console added the data source.  That generated this in the standalone.xml</p>
  
  <pre><code> &lt;datasource jta="false" jndi-name="java:/jdbc/ppsdb" pool-name="mypool" enabled="true" use-ccm="false"&gt;
                  &lt;connection-url&gt;jdbc:as400://development.ad.company.com/JKCDRIVER&lt;/connection-url&gt;
                  &lt;driver-class&gt;com.ibm.as400.access.AS400JDBCDriver&lt;/driver-class&gt;
                  &lt;driver&gt;as400&lt;/driver&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;timeout&gt;
                      &lt;set-tx-query-timeout&gt;false&lt;/set-tx-query-timeout&gt;
                      &lt;blocking-timeout-millis&gt;0&lt;/blocking-timeout-millis&gt;
                      &lt;idle-timeout-minutes&gt;0&lt;/idle-timeout-minutes&gt;
                      &lt;query-timeout&gt;0&lt;/query-timeout&gt;
                      &lt;use-try-lock&gt;0&lt;/use-try-lock&gt;
                      &lt;allocation-retry&gt;0&lt;/allocation-retry&gt;
                      &lt;allocation-retry-wait-millis&gt;0&lt;/allocation-retry-wait-millis&gt;
                  &lt;/timeout&gt;
                  &lt;statement&gt;
                      &lt;share-prepared-statements&gt;false&lt;/share-prepared-statements&gt;
                  &lt;/statement&gt;
              &lt;/datasource&gt;
  </code></pre>
  
  <p>now its working great, thanks</p>