Troubleshooting
Problem
A []ClassNotFoundException[] occurs in the Test Environment when you use []DB2ConnectionPoolDataSource[] to connect to DB2® v7.x.
Resolving The Problem
A ClassNotFoundException can occur if you are using the JDBC 1.0 driver as opposed to the JDBC 2.0 driver. When you apply a DB2 fix pack, the JDBC driver version may be changed back to 1.0.
You need to stop all DB2 services prior to performing the following instructions to ensure that all the required files are copied successfully.
To switch to JDBC 2.0, do the following steps:
- Open a command prompt.
- Run the batch file usejdbc2 from directory DB2_install_dir/SQLLIB/java12, where DB2_install_dir is the directory where DB2 is installed.
You can run the usejdbc1 and usejdbc2 batch files to switch the DB2 JDBC driver between JDBC 1.0 and JDBC 2.0. Usejdbc1 and usejdbc2 copy the required versions of the files into the DB2_install_dir/SQLLIB/java and DB2_install_dir/SQLLIB/bin directories.
To determine the current JDBC driver that is in use, you can view DB2_install_dir/SQLLIB/java12/inuse. Inuse describes the current JDBC driver that is in use. This file changes whenever you change drivers. For example, open the file inuse with a text editor, if “JDBC 2.0" appears you are using the JDBC 2.0 driver.
Historical Number
65975
004
000
Was this topic helpful?
Document Information
More support for:
WebSphere Studio Site Developer
Software version:
4.0.3, 5.0, 5.0.1, 5.1, 5.1.1, 5.1.2
Operating system(s):
Linux, Windows
Document number:
722471
Modified date:
19 August 2022
UID
swg21078529