Error: 'no ocijdbc12 in java.library.path' when using Oracle Client 19c
search cancel

Error: 'no ocijdbc12 in java.library.path' when using Oracle Client 19c

book

Article ID: 208310

calendar_today

Updated On:

Products

CA Automic One Automation CA Automic Workload Automation - Automation Engine

Issue/Introduction

This error can occur either on the AE when starting Java processes (JWP/JCP) or on the SQL Agent or DB Service

 

On the AE the following error is displayed in the JWP/JCP log:

20210128/165947.745 - 1      U00011849 UC4_sys_info: 'Buildnr: 1573815554148  Changelist: 1573734558'
20210128/165947.900 - 24     U00003545 UCUDB: Opening database ...
20210128/165948.026 - 27     U00045025 OSGI ['com.automic.kernel']: '[com.automic.kernel.impl.ServerProcess(5)] The activate method has thrown an exception'
20210128/165948.026 - 27               Unhandled Exception in thread ConfigurationListener Event Queue
20210128/165948.028 - 27     U00045014 Exception 'java.lang.UnsatisfiedLinkError: "no ocijdbc12 in java.library.path: [/opt/oracle/base/product/client_193000/lib, /usr/lib, /lib, /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]"' at 'java.lang.ClassLoader.loadLibrary():2670'.
20210128/165948.029 - 27     U00003620 Routine 'com.automic.kernel.impl.DefaultExceptionHandler' forces trace because of error.

When testing an Oracle CONN object via the DB Service or clicking the Preview button in SQL VARA object, a similar error is displayed in AWI:

Failed to create a connection to the database ('com.uc4.ex.sql.ConnectionException:java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path').

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Cause

The ojdbc8.jar is from an older Oracle Client version.

Use the following command to show the version of the driver:

>java -jar ojdbc8.jar

This will show version something like:

Oracle 12.2.0.1.0 JDBC 4.2 compiled with javac 1.8.0_91 on Tue_Dec_13_06:08:31_PST_2016

Resolution

Update the ojdbc8.jar either in the <Automation Engine>/bin/lib/ folder or in the <SQL Agent>/jdbc/ or <DB Service>/jdbc/ folder with the one from the Oracle client folder structure.

After the update the command

>java -jar ojdbc8.jar

should return:

Oracle 19.9.0.0.0 JDBC 4.2 compiled with javac 1.8.0_251 on Tue_Aug_11_01:11:38_PDT_2020

or

Oracle 21.9.0.0.0 JDBC 4.2 compiled with javac 1.8.0_351 on Mon_Nov_28_06:19:40_PST_2022