Defined two datasources to use two different JDBC drivers, but both datasources are using the same JDBC driver
 Technote (troubleshooting)
 
Problem(Abstract)
Since JDBC provider classes are loaded by a WebSphere® Application Server classloader, if you define JDBC providers that use different JDBC drivers of the same family (for example, both Oracle 9i and Oracle 10g thin driver), then which JDBC driver gets loaded is determined by which JDBC provider is processed first by the WebSphere Java™ Virtual Machine (JVM).

If you define one JDBC provider to use driver for Oracle 8.1.7.4 and another JDBC provider to use Oracle 9.2.0.5, and define two datasource's, one using each JDBC provider. The SystemOut.log file will show that both datasources are using the same driver. In the example, it was Oracle 8.1.7.4 JDBC driver that was loaded first.
 
Cause
The different versions of the Oracle driver have the same JAR filename (classes12.jar) and classnames. When classes get loaded into the JVM, only one set of the JDBC provider's classes is loaded. When the datasource is created, it uses whichever JDBC driver is already loaded in the JVM. This is working as designed.
 
Resolving the problem
Since most drivers are backward compatible, the later driver should be used.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
55997
660
706
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Classloader
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1200379
IBM Group: Software Group
Modified date: Mar 11, 2005