Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle JDBC oci8 doesn't work

Re: Oracle JDBC oci8 doesn't work

From: Victor Kroon <Victor.Kroon_at_horizon.nl>
Date: Mon, 29 Mar 1999 20:40:02 +0200
Message-ID: <922732688.502713@skyline.horizon.nl>


Ok, then have a go on this one (Linux, RedHat 5.2, Oracle 8.0.5) All Java sources compile well, but when you try to run them :

[oracle_at_lientje v8d1:/opt/oracle/jdbc/samples/oci8] java Employee

java.lang.UnsatisfiedLinkError: oci805jdbc

        at java/lang/Throwable.<init>(30)
        at java/lang/Error.<init>(21)
        at java/lang/LinkageError.<init>(21)
        at java/lang/UnsatisfiedLinkError.<init>(21)
        at java/lang/Runtime.loadLibrary(125)
        at java/lang/System.loadLibrary(90)
        at oracle/jdbc/oci7/OCIDBAccess.logon(142)
        at oracle/jdbc/driver/OracleConnection.<init>(103)
        at oracle/jdbc/driver/OracleDriver.connect(148)
        at java/sql/DriverManager.getConnection(59)
        at java/sql/DriverManager.getConnection(47)
        at Employee.main(21)

The environment settings are :

[oracle_at_lientje v8d1:/opt/oracle/jdbc/samples/oci8] env | grep PATH

PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/oracle/lib:/opt/oracle /jdb
c/lib:/opt/oracle/bin:/home/oracle/bin
CLASSPATH=/opt/oracle/jdbc/lib/classes111.zip:.:/usr/share/kaffe:/opt/oracle /jdb
c/lib
LD_LIBRARY_PATH=/opt/oracle/lib:/opt/oracle/jdbc/lib

(ORACLE_HOME=/opt/oracle)

Any ideas ? Looks a lot the same as the other problems, though LD is set !

Thomas Kyte wrote in message <36f25824.22167094_at_192.86.155.100>...
>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
>
>---------------------------------------------------------------------------
-
>Opinions are mine and do not necessarily reflect those of Oracle
Corporation Received on Mon Mar 29 1999 - 12:40:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US