IBM Use"isolate the resource provider" to establish data source connections using a different JDBC driver from the same database vendor - United States isolate this resource provider TECHNOTE (TROUBLESHOOTING)

PROBLEM(ABSTRACT)
 Customer has defined 3 Oracle JDBC Providers at cell, node and server
scope. Client have following configuration in websphere JDBC provider. 

In Cell Scope - C:\jdbc\ojdbc5\ojdbc5.jar 

In Node Scope - C:\jdbc\ojdbc6_g\ojdbc6_g.jar 

In Server Scope- C:\jdbc\ojdbc6\ojdbc6.jar 

In this case value of JDBC driver path in WebSphere variable is identical. Nornally, If JDBC provider configure at server level then server level driver will get load first. But in this case since all three drivers are from same vendor, So we can not control which driver is picking up. In this case 
"C:\jdbc\ojdbc6\ojdbc6.jar" should be loaded first but instated, ojdbc5.jar was load first

[13. 4. 5 12:05:15:625 KST] 00000023 CompoundClass < loadClass 

oracle.jdbc.driver.OracleDriver 

loader=com.ibm.ws.bootstrap.ExtClassLoader@5dc95dc9 

source=file:/C:/jdbc/ojdbc5/ojdbc5.jar Exit 






SYMPTOM
Due to multiple JDBC drivers from the same vendor were configured in different scopes, the wrong driver class was loaded.


CAUSE
When multiple versions of the JDBC driver are configured in WebSphere Application Server, irrespective of the scopes, there is a possibility of a collision of the classes and we cannot predict from which version of the driver jar the class got loaded. 

RESOLVING THE PROBLEM
 In order to support the existence of multiple versions of the driver jars, the "Isolate this resource provider" configuration helps to ensure there are no conflicts. This needs to be configured on each JDBC Provider. You cannot isolate only one resource provider, all the provider configurations in different scopes will have to be configured with the "Isolate this resource provider" setting. In this scenario, the resource provider classes from different versions of the jars are not imported or accessed to verify if the isolation has indeed worked. In order to use the server-scoped resource provider the datasource using the server-scoped jdbc provider will have to be referenced from the application after isolating the resource providers and using a resource reference in the application. 


Go to the JDBC Provider and enable "isolate the resource provider". When "Isolate this resource provider" is enabled, it ensures that only the jar that was specified in the classpath will be used for all the datasources under that particular JDBC provider. 

 

Here are links to Knowledge Center articles which contain further information on the setting: 


JDBC provider settings [https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/udat_manjdbcprodet.html]

Considerations for isolated resource providers [https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/rdat_isolatedlimitations.html]

Question: When click test connection, the older JDBC driver version shows in the SystemOut.log file 

When I click a test connection to a datasource, in the SystemOut.log file I can see the below information...

     [8/11/16 5:31:28:494 EDT] 00000088 DSConfigurati I   DSRA8205I: JDBC driver name  : Oracle JDBC driver  
     [8/11/16 5:31:28:495 EDT] 00000088 DSConfigurati I   DSRA8206I: JDBC driver version  : 9.2.0.1.0  
     [8/11/16 5:31:28:496 EDT] 00000088 DSConfigurati I   DSRA8025I: Successfully connected to DataSource.  
     [8/11/16 5:31:28:608 EDT] 00000088 DSConfigurati I   DSRA8203I: Database product name : Oracle  
     [8/11/16 5:31:28:608 EDT] 00000088 DSConfigurati I   DSRA8204I: Database product version : Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics

Where is WAS getting this information from?

We are using WAS ND v8.5.5.0. We are running Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production. The JDBC driver is ojdbc6.jar - Oracle 11.1.0.7.0-Production JDBC 4.0 compiled with JDK6.

There is another older driver ojdbc14.jar

When I do a test connection, I can see the JDBC Driver version is 9.2.0.1.0, but in the JDBC providers I have specified ojdbc6.jar. so it should show 11.1.0.7.0 but it is showing 9.2.0.1.0. why it is showing 9.2.0.1.0?

If we keep only ojdbc6.jar and do a test connection it is giving the correct JDBC Drivers version as it is same with ojdbc6.jar. But when we keep both ojdbc6.jar and ojdbc14.jar it is not giving the correct JDBC Driver version looks it is giving ojdbc14.jar version.

JDBC providers are pointed to ojdbc6.jar, but why it is showing a different JDBC driver version?

Answer: When multiple versions of the JDBC driver are configured in WebSphere Application Server, irrespective of the scopes, there is a possibility of a collision of the classes and we cannot predict from which version of the driver jar the class got loaded.