IBM Support

Use"isolate the resource provider" to establish data source connections using a different JDBC driver from the same database vendor

Troubleshooting


Problem

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

Considerations for isolated resource providers

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"DB Connections\/Connection Pooling","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5;8.0;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21634612