wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Need help to setup datasource for AS/400 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Need help to setup datasource for AS/400" Watch "Need help to setup datasource for AS/400" New topic
Author

Need help to setup datasource for AS/400

Mason Tran
Greenhorn

Joined: Jan 30, 2004
Posts: 1
I want to configure my EAR file from WSAD 5.0 to run on JBoss 3.2.3. I think I tried everything and still couldn't get it to work. I got my jboss.xml, and jboss-web.xml in the EAR file.
I placed jt400.jar in my C:\jboss-3.2.3\jboss-3.2.3\server\default\lib, and also added to my CLASSPATH.
Here is my db2-ds.xml file, not sure if I am using the right <driver-class>
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc b2:CDAS07</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCConnectionPoolDataSource</driver-class>
<user-name>user</user-name>
<password>password</password>
<min-pool-size>1</min-pool-size>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
</local-tx-datasource>
</datasources>
When I start my JBoss server, I got this message.
--------------------------Message Start-----------------------------------
12:10:30,945 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.ibm.as400.access.AS400JDBCConnectionPoolDataSource; - nested throwable: (java.lang.ClassCastException))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:160)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:477)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:213)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
..............
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: com.ibm.as400.access.AS400JDBCConnectionPoolDataSource; - nested throwable: (java.lang.ClassCastException)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:283)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:149)
... 84 more
Caused by: java.lang.ClassCastException
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:273)
... 85 more
--------------------------Message End-----------------------------------
Please help me. Any help will be greatly appreciated.
Thank you very much,
Mason Tran
 
 
subject: Need help to setup datasource for AS/400
 
Similar Threads
Error in DB2 connection Pooling
JBOSS and Mysql
Problem oin connecting Oracle database in JBOSS AS 4.2.3
JBoss Classpath
Oracle XA Exception