com.uc4.ex.sql.ConnectionException: java.lang.UnsatisfiedLinkError: ocijdbc12 (Not found in java.library.path)
I’m seeing this error again when trying to run an Oracle SQL job using the new v12.2 SQL agent.
com.uc4.ex.sql.ConnectionException: java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path
I followed the instructions provided by Daniel above, but the problem remains. Did something change in v12.2?
I fixed the problem. The solution and explanation follow.
com.uc4.ex.sql.ConnectionException: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
The SQL Agent INI file, ucxjsqlx.ini, appears to provide no way to specify the path of a specific JDBC file to use.
That last example describes the situation that was causing the problem on this agent. The jdbc subdirectory contained ojdbc6.jar, ojdbc7.jar, and ojdbc8.jar, but the system had only the Oracle 11 client installed. When I removed the ojdbc7.jar and ojdbc8.jar files and restarted the agent, the problem went away.
I will install the Oracle 12 client soon; then I will be able to put the newer JDBC JARs back in place.
#oracle #jdbc #ojdbc #caautomicworkloadautomation #sqlagent #ucxjsqlx
The SQL Agent installation instructions include some cryptic information about the JDBC driver. In light of my findings above, it is interesting to revisit these sections of the documentation:
Copy the file ojdbc5.jar or ojdbc6.jar to the folder's JDBC directory after you have installed the driver....The agent searches the relevant jar-file classes in the JDBC folder. The file name is irrelevant.
Copy the file ojdbc5.jar or ojdbc6.jar to the folder's JDBC directory after you have installed the driver.
The agent searches the relevant jar-file classes in the JDBC folder. The file name is irrelevant.
This suggests that the name of the JDBC JAR file is actually unimportant, and that the agent looks at the names of the classes (and versions) of the files contained in each JAR file under the jdbc subdirectory.
It is important to use the most current jar file. Store only one jar file in the JDBC folder.
Well, it’s actually more important to use the JAR file that works with the version of Java and Oracle being used. However I actually think this is the author’s rather unusual way of saying that the agent loads the JDBC driver with the highest version.
Having more than one JDBC JAR file in the directory is not a problem in itself.