0 Replies Latest reply on Jun 6, 2005 1:01 PM by mjaplin

    Problem using DB2 7.1 and 8.1 drivers together

    mjaplin

      Windows XP/JBoss 3.2.7/JDK1.4

      I am attempting to create two connection pools in JBoss, one that uses the DB2 7.1 Type 2 driver and one that uses the DB2 8.1 Type 4 driver. The problem is that the 7.1 pool does not work unless it is created before the 8.1 pool. If the 8.1 pool is created first, JBoss uses the 8.1 driver class to create the 7.1 connections. Here is the configuration info and log output. Any help is greatly appreciated!

      DB271-ds.xml
      <jndi-name>DB2v71</jndi-name>
      <connection-url>jdbc:db2:dbd2</connection-url>
      <driver-class>COM.ibm.db2.jdbc.app.DB2Driver</driver-class>

      DB281-ds.xml
      <jndi-name>DB2v81</jndi-name>
      <connection-url>jdbc:db2://mvsdev2.test.com:4240/test_dbd2</connection-url>
      <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>

      10:40:50,863 DEBUG [LocalManagedConnectionFactory] Checking driver for URL: jdbc:db2://MVSDEV2.test.COM:4240/test_DBD2
      10:40:50,863 DEBUG [LocalManagedConnectionFactory] Driver not yet registered for url: jdbc:db2://MVSDEV2.test.COM:4240/test_DBD2
      10:40:50,879 DEBUG [LocalManagedConnectionFactory] Driver already registered for url: jdbc:db2://MVSDEV2.test.COM:4240/test_DBD2
      10:43:49,178 DEBUG [LocalManagedConnectionFactory] Using properties: {user=urw003, password=--hidden--}
      10:43:49,178 DEBUG [LocalManagedConnectionFactory] Checking driver for URL: jdbc:db2:dbd2
      10:43:49,178 DEBUG [LocalManagedConnectionFactory] Driver already registered for url: jdbc:db2:dbd2
      10:43:49,194 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.ibm.db2.jcc.b.SQLException: Unable to load T2 native library. Type 2 JDBC architecture is not yet supported by the IBM DB2 JDBC Universal Driver Architecture)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:168)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:504)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:214)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:444)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:312)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at com.test.rrs.util.DatabaseUtil.getConnection(DatabaseUtil.java:52)
      at com.test.rrs.ftr.db.FeatureRatesPendAdd.(FeatureRatesPendAdd.java:61)
      at rrs.ftr.FeatureRateServlet.pendingAddRates(FeatureRateServlet.java:261)
      at rrs.ftr.FeatureRateServlet.routeAction(FeatureRateServlet.java:391)
      at rrs.ftr.FeatureRateServlet.service(FeatureRateServlet.java:603)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: com.ibm.db2.jcc.b.SQLException: Unable to load T2 native library. Type 2 JDBC architecture is not yet supported by the IBM DB2 JDBC Universal Driver Architecture
      at com.ibm.db2.jcc.t2.T2Configuration.a(T2Configuration.java:62)
      at com.ibm.db2.jcc.t2.T2Configuration.(T2Configuration.java:39)
      at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:261)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:158)
      ... 42 more