0 Replies Latest reply on Jan 8, 2003 2:11 PM by Gary Ogden

    classCastException with db2 8.1 and type 4 driver

    Gary Ogden Newbie

      I'm using jboss 3.0.4 with tomcat on redhat 8 with db2 8.1
      I've been able to use both the net (type 3) and app (type 2) drivers, but when I try to migrate to the type 4 driver , I get this class cast exception.

      WARN xa.XAManagedConnectionFactory - Unable to create and initialize XADataSource:
      java.lang.ClassCastException: com.ibm.db2.jcc.DB2Driver
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADS(XAManagedConnectionFactory.java:452)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:368)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:259)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:323)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.JDBCDataSource.getConnection(JDBCDataSource.java:110)


      All I did was change the XADataSourceClass property in the db2-service.xml file to:
      <config-property name="XADataSourceClass"
      type="java.lang.String">com.ibm.db2.jcc.DB2Driver</config-property>

      Anyone else run into this error migrating the the type4 driver, or have any idea why I am getting this problem?