Operating System - HP-UX
1753477 Members
4875 Online
108794 Solutions
New Discussion юеВ

Re: About Oracle9i libocijdbc9.so

 
SOLVED
Go to solution
Patrick Chim
Trusted Contributor

About Oracle9i libocijdbc9.so

Hi,

I have installed Oracle9i standard edition in my HP-UX 11i machine. I want to connect to the Oracle using JDBC OCI driver. However, I only got libocijdbc9.sl in $ORACLE_HOME/lib but from the Readme.txt it said I should have an file named libocijdbc9.so. Does anyone know how to solve this ?

Regards,
Patrick
11 REPLIES 11
T G Manikandan
Honored Contributor

Re: About Oracle9i libocijdbc9.so

DId you do a custom installation?

Re-run the installer go into the "custom"
menu of installation.
check for the programmer modules and click on JDBC OCI driver there and finish the installation

Revert
Yogeeraj_1
Honored Contributor

Re: About Oracle9i libocijdbc9.so

hi,

according to metalink,

When using 32-bit JVM then LD_LIBRARY_PATH should have $ORACLE_HOME/lib32 before $ORACLE_HOME/lib
When using 64-bit JVM then LD_LIBRARY_PATH should have $ORACLE_HOME/lib before $ORACLE_HOME/lib32

can you please check if the file you mentioned exists in either of the directories?

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Patrick Chim
Trusted Contributor

Re: About Oracle9i libocijdbc9.so

Hi,

I have checked that the Oracle JDBC/OCI Interfaces 9.2.0.1.0 has been installed !

Regards,
Patrick
Massimo Bianchi
Honored Contributor

Re: About Oracle9i libocijdbc9.so

Hi,
did you try the jdbc anyway ? Sometimes the documentation is incorrect, and they may have mispelled libocijdbc9.so instead of libocijdbc9.sl ....

Massimo
T G Manikandan
Honored Contributor

Re: About Oracle9i libocijdbc9.so

Yes,try adding
$ORACLE_HOME/lib32 to your LD_LIBRARY_PATH


Revert
Massimo Bianchi
Honored Contributor
Solution

Re: About Oracle9i libocijdbc9.so

Hi,
according to some metalink notes, that looks like the correct name for the library:

Subject: Re : "UnsatisfiedLinkError: /opt/9ias/lib/libocijdbc9.sl: Exec format error" raised using Oracle 9i Client on HP-UX version 11.11


FYI, we also encountered the exact error described above and were able to fix the problem.

Originally, we had added $ORACLE_HOME/lib to both the LD_LIBRARY_PATH and SHLIB_PATH variables. We changed the directory to be $ORACLE_HOME/lib32 and everything subsequently worked fine.


#############??

Subject: Re : Re : /u01/app/oracle/product/9.2.0/lib/libocijdbc9.sl: Exec format error


When using 32-bit JVM then LD_LIBRARY_PATH should have $ORACLE_HOME/lib32 before $ORACLE_HOME/lib
When using 64-bit JVM then LD_LIBRARY_PATH should have $ORACLE_HOME/lib before $ORACLE_HOME/lib32

Opening a Connection for the JDBC OCI Driver
===========================================
For the JDBC OCI driver, you can specify the database by a TNSNAMES entry. You can find the available TNSNAMES entries listed in the file tnsnames.ora on the client computer from which you are connecting. On Windows NT, this file is located in the [ORACLE_HOME]\NETWORK\ADMIN directory. On UNIX systems, you can find it in the /var/opt/oracle
directory.

For example, if you want to connect to the database on host myhost as user scott with password tiger that has a TNSNAMES entry of MyHostString, enter:

Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@MyHostString", "scott", "tiger");


Note that both the ":" and "@" characters are necessary.

For the JDBC OCI and Thin drivers, you can also specify the database with a Net8 keyword-value pair. This is less readable than a TNSNAMES entry but does not depend on the accuracy of the TNSNAMES.ORA file. The Net8 keyword-value pair also works with other JDBC drivers.

For example, if you want to connect to the database on host myhost that has a TCP/IP listener up on port 1521, and the SID (system identifier) is orcl, use a statement such as:

Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@(description=(address=(host= myhost)
(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))","scott", "tiger");


Moreover: extension .so for shared library is typical for Solaris server....


Give it a try... i'm it will work !
Patrick Chim
Trusted Contributor

Re: About Oracle9i libocijdbc9.so

Hi,

I've added $ORACLE_HOME/lib32 to my LD_LIBRARY_PATH and SHLIB_PATH but it still failed.

I also install Tomcat Server in my HP-UX box. When I access some sample jsp files, it show "org.apache.jasper.JasperException: no ocijdbc9 in java.library.path" and many exception errors came out.

Regards,
Patrick
Massimo Bianchi
Honored Contributor

Re: About Oracle9i libocijdbc9.so

Hi,
maybe problem is simpler... permission on the file and directory ?

In a similar thread, i found that executable permission is requested for shared libraries...

Massimo
twang
Honored Contributor

Re: About Oracle9i libocijdbc9.so

Edit PATH variable to contain $ORACLE_HOME/lib and LD_LIBRARY_PATH too.