Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help: Oracle JDBC problem

3 views
Skip to first unread message

Michael Chernecki

unread,
Dec 7, 2001, 3:36:56 PM12/7/01
to
Hi,
This is my first time using Oracle and Jdbc together. I installed the
Oracle drivers and added the CLASSPATH and LIBPATH as noted in the
install notes.I am running the sample program JdbcCheckup from the
Oracle Jdbc directory, and get the following message:

Please enter information to test connection to the database
Connecting to the database...Connecting...
java.lang.UnsatisfiedLinkError: Can't find library libocijdbc8.so in
LIBPATH
LIBPATH=/usr/jdk_base/lib/aix/native_threads:/iata/app/oracle/product/8.0.5/jdbc
/lib:/apps/cobol/coblib:/iata/app/oracle/product/8.0.5/jdbc/lib
at java.lang.Runtime.loadLibrary(Compiled Code)
at java.lang.System.loadLibrary(Compiled Code)
at oracle.jdbc.oci8.OCIDBAccess.logon(Compiled Code)
at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
Code)
at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at JdbcCheckup.main(Compiled Code)


I am running on AIX Unix and my .profile has the following lines
added:
# Oracle (Java) Environment Variables

export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip:$ORACLE_HOME/jdbc/lib/nls_
charset11.zip:.:

export LIBPATH=$LIBPATH$ORACLE_HOME/jdbc/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/jdbc/lib


Any help on getting this running would be appreciated.

Thanks,
Michael Chernecki
ADAPSYS L.P.

Tom Davies

unread,
Dec 9, 2001, 9:22:11 AM12/9/01
to

"Michael Chernecki" <mcher...@yahoo.com> wrote in message
news:4cb5d65e.01120...@posting.google.com...
[snip]

> java.lang.UnsatisfiedLinkError: Can't find library libocijdbc8.so in
> LIBPATH
>
LIBPATH=/usr/jdk_base/lib/aix/native_threads:/iata/app/oracle/product/8.0.5/
jdbc
> /lib:/apps/cobol/coblib:/iata/app/oracle/product/8.0.5/jdbc/lib

Is libocijdbc8.so in one of the directories in your LIBPATH?

Tom


Joel Schuster

unread,
Dec 10, 2001, 1:24:08 PM12/10/01
to
You need to add $ORACLE_HOME/lib to your LIBPATH as well. That's
because that is where the libocijdbc8.so library is located. (At least
on my distro)... BTW you might have an advantage using the thin client
instead... It doesn't use the underlying oci libraries and is all in
java so you don't need to have the oracle client installed on your
machines, you just send along the classes111.zip file.

mcher...@yahoo.com (Michael Chernecki) wrote in message news:<4cb5d65e.01120...@posting.google.com>...

Michael Chernecki

unread,
Dec 10, 2001, 10:43:08 PM12/10/01
to
Hi,
I have updated my CLASSPATH to include the classes12.zip, still had
the old classes111.zip. I still get the same error but slightly
different messages. New messages shown below:

Please enter information to test connection to the database
Connecting to the database...Connecting...

Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8
in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1251)
at java.lang.Runtime.loadLibrary0(Runtime.java:473)
at java.lang.System.loadLibrary(System.java:771)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:228)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:459)
at java.sql.DriverManager.getConnection(DriverManager.java:139)
at JdbcCheckup.main(JdbcCheckup.java:35)

I tried using the thin client with no success. It appears that the servers
does not have a listener or whatever the oci docs called it. Any help
would be appreciated in resolving this as my deadline is approaching and
many of our people are leaving for holidays, i.e System Admin (he has
authority to do software installs if required).
Thanks,
Mike Chernecki
ADAPSYS L.P.


In article <21c01d72.01121...@posting.google.com>,

AV

unread,
Dec 10, 2001, 11:39:56 PM12/10/01
to
To start "listener" :
--find and start lsnctrl.exe (or .sh) in oracle's bin or network or admin
dirs
-- enter "start" at "lsnctrl>" prompt
--enjoy using 1521 port :-)

AlexV

"Michael Chernecki" <mcher...@yahoo.com> wrote in message

news:mchernecki-10...@slkras01-p100.mts.net...

Michael Chernecki

unread,
Dec 11, 2001, 12:06:11 AM12/11/01
to
Hi,
Thanks for the info, but did I mention that I am on AIX Unix, lsnctrl.exe
sounds like a Windows thing. Do you have any solaris info.

Thanks,
Mike

In article <r9gR7.26526$oM3.1...@wagner.videotron.net>, "AV"

AV

unread,
Dec 11, 2001, 8:02:42 AM12/11/01
to
lsnctrl.sh :-)

Michael Chernecki

unread,
Dec 11, 2001, 1:20:09 PM12/11/01
to
Thanks Alex, the thin driver works fine now. Has anyone ever had the
oci drivers working properly, I give up trying to work with those.

Thanks,
Michael Chernecki
ADAPSYS L.P.

"AV" <avek_...@videotron.ca> wrote in message news:<LwnR7.40328$oM3.1...@wagner.videotron.net>...

0 new messages