Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle JDBC OCI driver access in Tomcat

843859Nov 30 2006 — edited Nov 30 2006
Hi,

I have a piece of code which I have to run in tomcat 5.5.7. This code is using Oracle JDBC OCI driver for database access. For use of OCI driver, the native library libocijdbc10.so has to be included.

When I run this code snippet as a standalone Java programme (standalone JVM), I do the following:

a) Give the command line option "-d64" while running the standalone programme.
b) Set the LD_LIBRARY_PATH to include the path of libocijdbc10.so and libocci.so

LD_LIBRARY_PATH=/opt/common/oracle_inst_client/instantclient_10_2

And

ls /opt/gmlc/common/oracle_inst_client/instantclient_10_2 ==>

classes12.jar
libnnz10.so
libociei.so
ojdbc14.jar
libclntsh.so.10.1
libocci.so.10.1
libocijdbc10.so

The standalone JVM works fine with these changes.

Now incase of tomcat, I have set the following parameters in "catalina.sh" :

JAVA_OPTS="-d64" - Djava.library.path=/opt/common/oracle_inst_client/instant
client_10_2

CATALINA_OPTS="-d64" -Djava.library.path=/opt/common/oracle_inst_client/ins
tantclient_10_2

I have copied all the jars and native libraries in $CATALINA_HOME/shared/lib and $CATALINA_HOME/common/lib

But the same peice of code when deployed in tomcat (with above mentioned settings) is not working.

Pls suggest a way out - some way to start tomcat application with "-d64" option.

Thanx and Regards,
Gurpreet.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2006
Added on Nov 30 2006
1 comment
473 views