How to use Oracle OCI (type 2) driver

I am trying to use type 2 OCI drivers/libraries to connect to our Oracle Wildfire database, but am not able to get Wildfire 3.0.1 to start on Red Hat linux; The following gets written to the stderror.log file:

java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path

Oracle advised that the ORACLE_HOME and LD_LIBRARY_PATH environment variables be set correctly, and to ensure that the correct version of ojdbc14.jar is on the classpath. I have done so, and other standalone java programs are able to connect on this server.

Here are the steps:

  • As a starting point, I have a functioning Wildfire server running on this linux server, connecting to its Oracle database using thin jdbc driver (the setting in wildfire.xml to “jdbc:oracle:oci:@wildfire.test”.

  • I removed ojdbc14.jar from /opt/wildfire/lib

  • I modified the wildfire script and added the lines to export the environment variables, and to add_class_path “$my_oracle_ojdbc14_jar” (this is the same one which my command-line test java program uses).

echo “$ORACLE_HOME” and “$LD_LIBRARY_PATH” and “$local_classpath” statements just before the nohup “$app_java_home/bin/java”… line show that these are set as expected.

I ran a test command-line java program successfully to ensure that I can connect to this database over OCI with the above environment variables set as prescribed, using the same oracle14.jar in the classpath.

Does anyone know of a way to do this?

–Art Sarkissian

Hi Art,

Sounds like maybe a permissions issue on the libs - are you running the command line program as the same user that wildfire runs as?

-Chip

Have a look at this:

http://docs.codehaus.org/display/GEOSDOC/libocijdbc10-socouldnotbefoundforOCI+datastore