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

connecting to Oracle7 with Jdbc

5 views
Skip to first unread message

Erbug Celebi

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

Hi All,

I am trying to connect to Oracle7 with Jdbc. But When execute the class
following error messages are prompted to me:

java.lang.UnsatisfiedLinkError: no oci803jdbc in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java:440)
at java.lang.System.loadLibrary(System.java:569)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:93)
at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
at java.sql.DriverManager.getConnection(DriverManager.java:90)
at java.sql.DriverManager.getConnection(DriverManager.java:132)
at LobExample.main(LobExample.java:23)

What can I do to correct this problem.

Thanks ,

Erbug


John R. Howey

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to Erbug Celebi

Put the OCI library files in either your PATH (Windows) or LD_LIBRARY_PATH
(Solaris). You
also must have SQL*NET installed and configured properly to use the OCI
drivers.


Stephen Rettie

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

I had the same problem (using oci7) - the solution is to move the
oci73jdbc.dll (or equivalent) from the JDBC\LIB directory to your
[ORACLE_HOME]\BIN directory. C:\ORANT\BIN is in my PATH (I am running on
NT 4.0).

However I then got a 'java.lang.UnsatisfiedLinkError: make_c_state' error.

I am using the IBM Visual Age for Java IDE and I had tried all sorts of
combinations of CLASSPATH and PATH settings. I logged a support call with
Oracle UK but they weren't much help. Finally out of exasperation I
installed the JDK (VA Java has it embedded in the IDE somewhere); added
C:\JDK\BIN to my PATH; added C:\JDK and C:\ORANT\JDBC\LIB\CLASSES111.ZIP to
my CLASSPATH;
compiled JdbcCheckup.java at the DOS prompt and ran it...and lo and behold
it worked!!

I shall be phoning IBM tomorrow for an explanation!!


Erbug Celebi wrote:

> Hi All,
>
> I am trying to connect to Oracle7 with Jdbc. But When execute the class
> following error messages are prompted to me:
>
> java.lang.UnsatisfiedLinkError: no oci803jdbc in shared library path
> at java.lang.Runtime.loadLibrary(Runtime.java:440)
> at java.lang.System.loadLibrary(System.java:569)
> at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
> at
> oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:93)
> at
> oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
> at java.sql.DriverManager.getConnection(DriverManager.java:90)
> at java.sql.DriverManager.getConnection(DriverManager.java:132)
> at LobExample.main(LobExample.java:23)
>
> What can I do to correct this problem.
>

> Thanks ,
>
> Erbug

--
Stephen Rettie

Email: ste...@class.demon.co.uk
WWW: http://www.class.demon.co.uk/stephen.htm

Mick McRae

unread,
Jan 28, 1998, 3:00:00 AM1/28/98
to Erbug Celebi

Erbug,

The " java.lang.UnsatisfiedLinkError: no oci803jdbc in shared library path"
error message indicates that you are trying to access the oci8 library
rather than the oci7 library. Make sure your database connection is as
follows;

Connection conn = DriverManager.getConnection ("jdbc:oracle:oci7:@SID",
"username", "passwd");

Under UNIX, ensure that your LD_LIBRARY_PATH inlcudes the full path to the
jdbc/lib directory. This allows java to find the liboci733jdbc.so

Under NT/95 there must be a similar path statement to the appropriate dll
(The name will probably be something like oci803jdbc.dll)

Hope this helps
Mick

0 new messages