My Oracle Support Banner

Issues Connecting to DB When Running Scheduled Tasks (Doc ID 1409996.1)

Last updated on OCTOBER 30, 2019

Applies to:

Identity Manager - Version 9.1.0.2 and later
Information in this document applies to any platform.

Purpose

When running a scheduled task, running in the same Java runtime as OIM (Jrockit), the below error occurs intermittently:

ERROR,http://COM.ABC.DEF.RACFDB2,racfDb2Connect - SQLException caught - Assuming database is not available: java.sql.SQLException: No suitable driver found for jdbc:db2://<server>:<port>/<database>


When running from Linux command line, the same Linux instance that OIM is running in, there is no error. The Java runtime that is being used from the command line is:
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
JRockit and run java -version:
Oracle JRockit(R) (build R28.1.1-14_BR11718574-141097-1.6.0_22-20110204-1551-linux-x86_64, compiled mode)

Looks like the DriverManager is not registering loaded drivers as expected. When using the following:

String oUrl = "jdbc:db2://<server>:<port>/<database>;
String driver = "com.ibm.db2.jcc.DB2Driver";
Class.forName(driver);
Driver jdbcdriver = DriverManager.getDriver(oUrl);


The below SQL error is seen :
java.sql.SQLException: No suitable driver found for jdbc:db2://<server>:<port>/<database>

However, when using the following, there are no issues:

String oUrl = "jdbc:db2://<server>:<port>/<database>";
Driver newDriver = new DB2Driver();
DriverManager.registerDriver(newDriver);
Driver jdbcdriver = DriverManager.getDriver(oUrl);


Need to understand as to why the above issue occurs.

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Troubleshooting Steps

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.