Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle JDBC oci8 doesn't work
A copy of this was sent to mconti13_at_my-dejanews.com
(if that email address didn't require changing)
On Mon, 15 Mar 1999 17:20:03 GMT, you wrote:
>I have tried to connect to a databace Oracle 8.0.4 by JDBC - oci8 from a
>Java JDK 1.2 application.
>
>The result is the following runtime error:
>
>Exception in thread "main" java.lang.UnsatisfiedLinkError: no oci804jdbc in
>java.library.path
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.<init>(Throwable.java:94)
> at java.lang.Error.<init>(Error.java:50)
> at java.lang.LinkageError.<init>(LinkageError.java:43)
> at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:42)
> at java.lang.ClassLoader.loadLibrary(Compiled Code)
> at java.lang.Runtime.loadLibrary0(Runtime.java:471)
> at java.lang.System.loadLibrary(System.java:745)
> at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:149)
> at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:103)
> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(DriverManager.java:137)
> at Employee.main(Compiled Code)
>
>I'm sure that the library oci804jdbc.so is in the path.
>
is it in the PATH or the LD_LIBRARY_PATH. It needs to be in the LD_LIBRARY_PATH. Consider this example:
$ unsetenv LD_LIBRARY_PATH
$ !ja
java UTest
Program Started
java.lang.UnsatisfiedLinkError: no oci805jdbc in shared library path
at java.lang.Throwable.<init>(Compiled Code) at java.lang.Error.<init>(Compiled Code) at java.lang.LinkageError.<init>(Compiled Code) at java.lang.UnsatisfiedLinkError.<init>(Compiled Code) at java.lang.Runtime.loadLibrary(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at oracle.jdbc.oci7.OCIDBAccess.logon(Compiled Code) at oracle.jdbc.driver.OracleConnection.<init>(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 UTest.main(Compiled Code)
$ setenv LD_LIBRARY_PATH $ORACLE_HOME/lib
$ !ja
java UTest
Program Started
$
the stack trace looks alot like yours....
>The classical example Employee.java results in the same error.
>
>On the contrary, the Thin driver works well, but i hope the oci8 driver will
>be faster.
>
>The Operating System for server and client is Sun Solaris 2.6
>
>Can somebody help me?
>
>Marco
>
>Thanks in advanced
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |