Configuring Data Source Using DB2 JDBC When DB2 Is Not Used As WebSphere Repository
 Technote (FAQ)
 
Problem
When configuring data source using DB2 JDBC, the "Test Connection" button (from data source's property window) works but the application fails with the exception:

ClassNotFoundException: COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
or
java.sql.SQLException: java.lang.UnsatisfiedLinkError
 
Solution
The problem is that the DB2 environment is not set up. If DB2 is used as WebSphere respository, the installation sets the DB2 environment automatically.

To set the DB2 enviroment to connect to a DB2 data source, edit the startupServer.sh script to run the db2profile script that sets up the DB2 environment. This will resolve the java.sql.SQLException: java.lang.UnsatisfiedLinkError. For example:


# Setup envioment for DB2 support        
. /apps/db2data/db2conn/sqllib/db2profile

Then copy the db2java.zip file in the $WAS_ROOT/lib/ext directory to resolve the ClassNotFoundException: COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource.

 
 
Product Alias/Synonym
WAS
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1108885
IBM Group: Software Group
Modified date: Apr 29, 2003