You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Narayanaswamy, Mohan" <Mo...@in.standardchartered.com> on 2006/11/30 14:38:41 UTC

RE: Oracle JDBC OCI driver access in Tomcat

Below information may be useful to you.

abstract of oracle technical docs :
JDK Driver File Name JDBC Version
--- ---------------- ------------
1.1 classes111.zip 7.3.4 -
1.2 classes12.zip 8.1.6 -
1.3 classes12.zip 9.2 -
1.4 ojdbc14.zip 9.2 -

If you use oracle 9i and JDK 1.4 you must use ojdbc14.jar (and not
ojdbc14.zip as oracle says), classes12.zip also doesn't work.

Regards,
Mohan
 

-----Original Message-----
From: Gurpreet.Sachdeva@aricent.com
[mailto:Gurpreet.Sachdeva@aricent.com] 
Sent: Friday, December 01, 2006 2:45 AM
To: users@tomcat.apache.org
Subject: Oracle JDBC OCI driver access in Tomcat





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.



***********************  Aricent-Unclassified   ***********************

"DISCLAIMER: This message is proprietary to Aricent  and is intended
solely for the use of the individual to whom it is addressed. It may
contain privileged or confidential information and should not be
circulated or used for any purpose other than for what it is intended.
If you have received this message in error, please notify the originator
immediately. If you are not the intended recipient, you are notified
that you are strictly prohibited from using, copying, altering, or
disclosing the contents of this message. Aricent accepts no
responsibility for loss or damage arising from the use of the
information transmitted by this email including damage from virus."




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

This email is confidential. If you are not the addressee tell the sender immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not accept liability for
damage caused by this email and may monitor email traffic.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle JDBC OCI driver access in Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
Yep.. which is exactly the reason why I said be careful when loading in type 2 OCI binaries
I agree that If you error on the side of caution and stay with Type4 drivers you wont have to load them in

If you get stuck in either Type 2 or Type 4 as this is tricky stuff.. feel free to contact me offline for 'static free transmissions'

M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Gregor Schneider" <rc...@googlemail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>; "Martin Gainty" <mg...@hotmail.com>
Sent: Thursday, November 30, 2006 12:15 PM
Subject: Re: Oracle JDBC OCI driver access in Tomcat


>I wouldn't recommend using the OCI-driver in general, esp. in Tomcat,
> since it requires the OCI-middleware.
> 
> Check your Oracle-docs for the "Thin"-driver (class 4) and use that one.
> 
> Greg
> -- 
> what's puzzlin' you, is the nature of my game
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

Re: Oracle JDBC OCI driver access in Tomcat

Posted by Gregor Schneider <rc...@googlemail.com>.
I wouldn't recommend using the OCI-driver in general, esp. in Tomcat,
since it requires the OCI-middleware.

Check your Oracle-docs for the "Thin"-driver (class 4) and use that one.

Greg
-- 
what's puzzlin' you, is the nature of my game

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle JDBC OCI driver access in Tomcat

Posted by Mark Thomas <ma...@apache.org>.
Martin Gainty wrote:
> 2 more ways of doing the same thing
> And yes I did this 3 months ago and it worked exactly as I explained
> and BTW worked for all environments that use JVM
> If stupidity were money you BS Chuck would be rich

Martin,

There is no justification whatsoever for this sort of mud slinging.
Chuck made a perfectly reasonable criticism of your post.

This isn't about which of you is right and which of you is wrong, it
is about treating other members of the Tomcat community with respect.

You owe Chuck a public apology.

Mark
tomcat-user-owner


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle JDBC OCI driver access in Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
2 more ways of doing the same thing
And yes I did this 3 months ago and it worked exactly as I explained
and BTW worked for all environments that use JVM
If stupidity were money you BS Chuck would be rich

Bye,

This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, November 30, 2006 4:47 PM
Subject: RE: Oracle JDBC OCI driver access in Tomcat


> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Subject: Re: Oracle JDBC OCI driver access in Tomcat
> 
> where else do you load in the OCI libraries?

You've obviously never done this, or bothered to read the doc.  Here's
the one for Solaris:
http://java.sun.com/j2se/1.5.0/runtime_solaris.html

Note that the placement and location specification of native libraries
is platform- and JVM-specific, but most use the LD_LIBRARY_PATH
environment variable these days.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Oracle JDBC OCI driver access in Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Subject: Re: Oracle JDBC OCI driver access in Tomcat
> 
> where else do you load in the OCI libraries?

You've obviously never done this, or bothered to read the doc.  Here's
the one for Solaris:
http://java.sun.com/j2se/1.5.0/runtime_solaris.html

Note that the placement and location specification of native libraries
is platform- and JVM-specific, but most use the LD_LIBRARY_PATH
environment variable these days.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle JDBC OCI driver access in Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
Ok hotshot
where else do you load in the OCI libraries?
HUH?

This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, November 30, 2006 1:19 PM
Subject: RE: Oracle JDBC OCI driver access in Tomcat


> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Subject: Re: Oracle JDBC OCI driver access in Tomcat
> 
> be careful when manipulating LD_LIBRARY_PATH in 
> $JAVA_HOME/jre/lib/$Processor/jvm.cfg to include libraries 
> located in $ORACLE_HOME/lib

Martin, where do you come up with this stuff?  The jvm.cfg file is used
to determine which JVM .dll or .so to use, not to indicate where to find
user native libraries.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Oracle JDBC OCI driver access in Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Subject: Re: Oracle JDBC OCI driver access in Tomcat
> 
> be careful when manipulating LD_LIBRARY_PATH in 
> $JAVA_HOME/jre/lib/$Processor/jvm.cfg to include libraries 
> located in $ORACLE_HOME/lib

Martin, where do you come up with this stuff?  The jvm.cfg file is used
to determine which JVM .dll or .so to use, not to indicate where to find
user native libraries.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle JDBC OCI driver access in Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
You have to install Oracle 9 Client
http://forums.oracle.com/forums/thread.jspa?messageID=1526720&#1526720
and make a backup copy of your jvm.cfg
be careful when manipulating LD_LIBRARY_PATH in $JAVA_HOME/jre/lib/$Processor/jvm.cfg to include libraries located in $ORACLE_HOME/lib
(version inconsistencies with either so or dll libraries may very well cause the VM to halt)

Anyone else?
M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: <Gu...@aricent.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Cc: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, November 30, 2006 2:18 PM
Subject: RE: Oracle JDBC OCI driver access in Tomcat


> 
> 
> 
> 
> Hi Mohan,
> 
> Thanx for the suggestion. But I am already using jars. I am not using zips
> (as indicated below in the listing of libraries).
> 
> Regards,
> Gurpreet
> 
> 
>                                                                           
>             "Narayanaswamy,                                               
>             Mohan"                                                        
>             <Mohan.Narayanasw                                          To 
>             amy@in.standardch         "Tomcat Users List"                 
>             artered.com>              <us...@tomcat.apache.org>           
>                                                                        cc 
>             11/30/2006 07:08                                              
>             PM                                                    Subject 
>                                       RE: Oracle JDBC OCI driver access   
>                                       in Tomcat                           
>             Please respond to                                             
>               "Tomcat Users                                               
>                   List"                                                   
>             <users@tomcat.apa                                             
>                 che.org>                                                  
>                                                                           
>                                                                           
> 
> 
> 
> 
> 
> Below information may be useful to you.
> 
> abstract of oracle technical docs :
> JDK Driver File Name JDBC Version
> --- ---------------- ------------
> 1.1 classes111.zip 7.3.4 -
> 1.2 classes12.zip 8.1.6 -
> 1.3 classes12.zip 9.2 -
> 1.4 ojdbc14.zip 9.2 -
> 
> If you use oracle 9i and JDK 1.4 you must use ojdbc14.jar (and not
> ojdbc14.zip as oracle says), classes12.zip also doesn't work.
> 
> Regards,
> Mohan
> 
> 
> -----Original Message-----
> From: Gurpreet.Sachdeva@aricent.com
> [mailto:Gurpreet.Sachdeva@aricent.com]
> Sent: Friday, December 01, 2006 2:45 AM
> To: users@tomcat.apache.org
> Subject: Oracle JDBC OCI driver access in Tomcat
> 
> 
> 
> 
> 
> 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.
> 
> 
> 
> ***********************  Aricent-Unclassified   ***********************
> 
> "DISCLAIMER: This message is proprietary to Aricent  and is intended
> solely for the use of the individual to whom it is addressed. It may
> contain privileged or confidential information and should not be
> circulated or used for any purpose other than for what it is intended.
> If you have received this message in error, please notify the originator
> immediately. If you are not the intended recipient, you are notified
> that you are strictly prohibited from using, copying, altering, or
> disclosing the contents of this message. Aricent accepts no
> responsibility for loss or damage arising from the use of the
> information transmitted by this email including damage from virus."
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> This email is confidential. If you are not the addressee tell the sender
> immediately and destroy this email
> without using, sending or storing it. Emails are not secure and may suffer
> errors, viruses, delay,
> interception and amendment. Standard Chartered PLC and subsidiaries
> ("SCGroup") do not accept liability for
> damage caused by this email and may monitor email traffic.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> ***********************  Aricent-Unclassified   ***********************
> 
> "DISCLAIMER: This message is proprietary to Aricent  and is intended solely
> for the use of
> the individual to whom it is addressed. It may contain privileged or
> confidential information and should not be
> circulated or used for any purpose other than for what it is intended. If
> you have received this message in error,
> please notify the originator immediately. If you are not the intended
> recipient, you are notified that you are strictly
> prohibited from using, copying, altering, or disclosing the contents of
> this message. Aricent accepts no responsibility for
> loss or damage arising from the use of the information transmitted by this
> email including damage from virus."
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

RE: Oracle JDBC OCI driver access in Tomcat

Posted by Gu...@aricent.com.



Hi Mohan,

Thanx for the suggestion. But I am already using jars. I am not using zips
(as indicated below in the listing of libraries).

Regards,
Gurpreet


                                                                           
             "Narayanaswamy,                                               
             Mohan"                                                        
             <Mohan.Narayanasw                                          To 
             amy@in.standardch         "Tomcat Users List"                 
             artered.com>              <us...@tomcat.apache.org>           
                                                                        cc 
             11/30/2006 07:08                                              
             PM                                                    Subject 
                                       RE: Oracle JDBC OCI driver access   
                                       in Tomcat                           
             Please respond to                                             
               "Tomcat Users                                               
                   List"                                                   
             <users@tomcat.apa                                             
                 che.org>                                                  
                                                                           
                                                                           





Below information may be useful to you.

abstract of oracle technical docs :
JDK Driver File Name JDBC Version
--- ---------------- ------------
1.1 classes111.zip 7.3.4 -
1.2 classes12.zip 8.1.6 -
1.3 classes12.zip 9.2 -
1.4 ojdbc14.zip 9.2 -

If you use oracle 9i and JDK 1.4 you must use ojdbc14.jar (and not
ojdbc14.zip as oracle says), classes12.zip also doesn't work.

Regards,
Mohan


-----Original Message-----
From: Gurpreet.Sachdeva@aricent.com
[mailto:Gurpreet.Sachdeva@aricent.com]
Sent: Friday, December 01, 2006 2:45 AM
To: users@tomcat.apache.org
Subject: Oracle JDBC OCI driver access in Tomcat





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.



***********************  Aricent-Unclassified   ***********************

"DISCLAIMER: This message is proprietary to Aricent  and is intended
solely for the use of the individual to whom it is addressed. It may
contain privileged or confidential information and should not be
circulated or used for any purpose other than for what it is intended.
If you have received this message in error, please notify the originator
immediately. If you are not the intended recipient, you are notified
that you are strictly prohibited from using, copying, altering, or
disclosing the contents of this message. Aricent accepts no
responsibility for loss or damage arising from the use of the
information transmitted by this email including damage from virus."




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

This email is confidential. If you are not the addressee tell the sender
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries
("SCGroup") do not accept liability for
damage caused by this email and may monitor email traffic.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




***********************  Aricent-Unclassified   ***********************

"DISCLAIMER: This message is proprietary to Aricent  and is intended solely
for the use of
the individual to whom it is addressed. It may contain privileged or
confidential information and should not be
circulated or used for any purpose other than for what it is intended. If
you have received this message in error,
please notify the originator immediately. If you are not the intended
recipient, you are notified that you are strictly
prohibited from using, copying, altering, or disclosing the contents of
this message. Aricent accepts no responsibility for
loss or damage arising from the use of the information transmitted by this
email including damage from virus."



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org