java.lang.UnsatisfiedLinkError: /opt/oracle/lib/libocijdbc10.jnilib

Discussion in 'Java' started by laredotornado, Oct 16, 2009.

  1. Hi,

    I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an Oracle
    10g server via JDBC (Java 1.5). I just installed the Mac OS X 10.2
    Instant Client Package - Basic Lite from here --
    http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html.
    Sadly, when I try and run my console app to connect, I get this
    error ...

    Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
    lib/libocijdbc10.jnilib:
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:993)
    at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3135)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary
    (T2CConnection.java:3131)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
    at oracle.jdbc.driver.PhysicalConnection.<init>
    (PhysicalConnection.java:414)
    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
    at oracle.jdbc.driver.T2CDriverExtension.getConnection
    (T2CDriverExtension.java:78)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at
    org.hibernate.connection.DriverManagerConnectionProvider.getConnection
    (DriverManagerConnectionProvider.java:133)
    at org.hibernate.cfg.SettingsFactory.buildSettings
    (SettingsFactory.java:111)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:
    2097)
    at myco.dor.dmv.driver.youthful.database.YouthfulDriverDatabase.<init>
    (YouthfulDriverDatabase.java:77)
    at
    myco.dor.dmv.driver.youthful.database.YouthfulDriverDatabase.getInstance
    (YouthfulDriverDatabase.java:83)
    at myco.dor.dmv.driver.youthful.AddressFileProcessor.execute
    (AddressFileProcessor.java:86)
    at myco.dor.dmv.driver.youthful.AddressFileProcessor.main
    (AddressFileProcessor.java:81)

    Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
    classes12.jar. How can I troubleshoot this further?

    Thanks, - Dave
     
    laredotornado, Oct 16, 2009
    #1
    1. Advertisements

  2. In article
    <>,
    laredotornado <> wrote:

    > I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
    > Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS X
    > 10.2 Instant Client Package - Basic Lite from here --
    > <http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html>.
    > Sadly, when I try and run my console app to connect, I get this error:
    >
    > Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
    > lib/libocijdbc10.jnilib:

    [...]
    > Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
    > classes12.jar. How can I troubleshoot this further?


    You might see if setting the library path helps:

    java -Djava.library.path="..."

    Alternatively, the Oracle thin drivers are here:

    <http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/\jdbc_10201.html>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Oct 16, 2009
    #2
    1. Advertisements

  3. laredotornado

    Roedy Green Guest

    On Fri, 16 Oct 2009 15:00:52 -0700 (PDT), laredotornado
    <> wrote, quoted or indirectly quoted someone
    who said :

    >java.lang.UnsatisfiedLinkError:


    see
    http://mindprod.com/jgloss/runerrormessages.html#UNSATISFIEDLINKERROR
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
    ~ Eric S. Raymond (born: 1957-12-04 age: 51) The Cathedral and the Bazaar
     
    Roedy Green, Oct 17, 2009
    #3
  4. laredotornado

    Lew Guest

    John B. Matthews wrote:
    > In article
    > <>,
    > laredotornado <> wrote:
    >
    >> I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
    >> Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS X
    >> 10.2 Instant Client Package - Basic Lite from here --
    >> <http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html>.
    >> Sadly, when I try and run my console app to connect, I get this error:
    >>
    >> Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
    >> lib/libocijdbc10.jnilib:

    > [...]
    >> Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
    >> classes12.jar. How can I troubleshoot this further?

    >
    > You might see if setting the library path helps:
    >
    > java -Djava.library.path="..."
    >
    > Alternatively, the Oracle thin drivers are here:
    >
    > <http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/\jdbc_10201.html>


    One wonders why the OP is using classes12.jar and not ojdbc5.jar. The former
    was supplanted by the Java 1.4 version over seven and a half years ago, and
    that version became obsolete with Java 1.4 itself about a year ago. With Java
    5 just about two weeks away from its own end-of-service-life date, shouldn't
    we be using at least the Java 5 libraries?

    I'm not even sure classes12.jar fully groks all the capabilities of Oracle 10g.

    The price is right; update your Oracle JDBC driver library.

    --
    Lew
     
    Lew, Oct 17, 2009
    #4
  5. In article <hbb3pd$tni$>, Lew <>
    wrote:

    > John B. Matthews wrote:
    > > In article
    > > <>,
    > > laredotornado <> wrote:
    > >
    > >> I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
    > >> Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS
    > >> X 10.2 Instant Client Package - Basic Lite from here --
    > >> <http://www.oracle.com/technology/software/tech/oci/instantclient/h
    > >> tdocs/in tel_macsoft.html>. Sadly, when I try and run my console
    > >> app to connect, I get this error:
    > >>
    > >> Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
    > >> lib/libocijdbc10.jnilib:

    > > [...]
    > >> Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
    > >> classes12.jar. How can I troubleshoot this further?

    > > [...]

    >
    > One wonders why the OP is using classes12.jar and not ojdbc5.jar.
    > The former was supplanted by the Java 1.4 version over seven and a
    > half years ago, and that version became obsolete with Java 1.4 itself
    > about a year ago. With Java 5 just about two weeks away from its own
    > end-of-service-life date, shouldn't we be using at least the Java 5
    > libraries?
    >
    > I'm not even sure classes12.jar fully groks all the capabilities of
    > Oracle 10g.
    >
    > The price is right; update your Oracle JDBC driver library.


    Egad, you're right; I'd overlooked the old JAR. The file ojdbc14.jar
    appears to be intended for use with JDK 1.4 or 1.5. Although
    ojdbc14.jar is already in the OP's Basic Lite download, let me take
    another stab at a working link:

    <http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Oct 17, 2009
    #5
  6. laredotornado

    varshasavant2002

    Joined:
    Nov 18, 2016
    Messages:
    4
    Likes Received:
    0
    Hello,

    I am also facing similar issue .

    Trying to migrate application from JBoss to tomcat8 .
    We are using a .so native lib for a specific functionality .

    Everytime this function is called we need to load .so file but it throws error :
    Native code library failed to load. java.lang.UnsatisfiedLinkError:

    I have tried multiple things
    1. set -Djava.library.path = XX folder path of native lib explicitly through tomcat VM argument
    2. copy xxx.so file to /usr/lib/ folder and give the -Djava.library.path= /usr/lib
    3. Also tried installing tomcat-APR and tomcat-Native libraries
    4. Tried to Load file using below line to check where native lib is getting loaded or not
    System.loadLibrary(so filename );

    5.Tried settign export LD_LIBRARY_PATH=/usr/local/apr/lib

    But NO LUCK :(:(

    Please someone help with this .
    Why my xxx.so file is not getting loaded


    -Varsha
     
    varshasavant2002, Nov 18, 2016
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Lorin Hochstein
    Replies:
    2
    Views:
    2,036
    Lorin Hochstein
    Mar 5, 2004
  2. Fahad
    Replies:
    1
    Views:
    748
    Roedy Green
    Jul 1, 2005
  3. Replies:
    1
    Views:
    2,647
    Roedy Green
    Sep 15, 2005
  4. TsanChung
    Replies:
    0
    Views:
    1,841
    TsanChung
    Sep 4, 2008
  5. TsanChung
    Replies:
    8
    Views:
    3,878
    anandmadhab
    Sep 30, 2011
  6. Ittay Dror
    Replies:
    1
    Views:
    391
    Nobuyoshi Nakada
    Dec 7, 2008
  7. ramanmu
    Replies:
    1
    Views:
    413
    A. Sinan Unur
    May 16, 2005
  8. Feyruz
    Replies:
    4
    Views:
    3,428
    Sherm Pendley
    Oct 14, 2005
Loading...