This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help to setup datasource for AS/400

Mason Tran
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
<connection-url>jdbc b2:CDAS07</connection-url>
<!-- 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>
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:; - nested throwable: (java.lang.ClassCastException))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for:; - nested throwable: (java.lang.ClassCastException)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(
... 84 more
Caused by: java.lang.ClassCastException
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(
... 85 more
--------------------------Message End-----------------------------------
Please help me. Any help will be greatly appreciated.
Thank you very much,
Mason Tran
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic