I am trying to setup a jboss 6.3 data-source to an ibm as400
jboss 6.3 is running on a windows server 2012 VM java 1.8.0_31 64 bit
i am getting this error in the console on start up of jboss
1
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]
this is my module.xml i have it and the driver jt400.jar in
D:\Program Files\jboss-eap-6.3\modules\com\ibm\as400\main
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<module xmlns="urn:jboss:module:1.0" name="com.ibm.as400">
<resources>
<resource-root path="jt400.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
This is the datasource subsystem from my Standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jndi-name="java:jboss/datasources/PPSDB" pool-name="java:jboss/datasources/PPSDB_Pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:as400://development.ad.company.com/JKCDRIVER;DB_CLOSE_DELAY=-1</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<driver>as400</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>user</user-name>
<password>password</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
</validation>
</datasource>
<drivers>
<driver name="as400" module="com.ibm.as400"/>
</drivers>
</datasources>
</subsystem>
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 https://developer.jboss.org/wiki/SetUpADB2Datasource
any help would be greatly appreciated
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
<datasource jta="false" jndi-name="java:/jdbc/ppsdb" pool-name="mypool" enabled="true" use-ccm="false">
<connection-url>jdbc:as400://development.ad.company.com/JKCDRIVER</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<driver>as400</driver>
<security>
<user-name>user</user-name>
<password>pass</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
now its working great, thanks
Make sure your 'jt400.jar' is on the path \modules\com\ibm\as400\main
Your module.xml should read like
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.ibm.as400">
<resources>
<resource-root path="jt400.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
In your Driver tag add the driver-class child
<driver name="as400" module="com.ibm.as400">
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
</driver>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With