4 Replies Latest reply on Jul 8, 2007 3:17 PM by 586926

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9

    480515
      Hi,

      I am getting this error when trying to run a job in Solaris
      Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1344)
      at java.lang.Runtime.loadLibrary0(Runtime.java:744)
      at java.lang.System.loadLibrary(System.java:815)
      at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:265)
      at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:360)
      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:172)

      ORACLE_HOME is correct
      LD_LIBRARY_PATH is pointing to ORACLE_HOME/lib
      CLASSPATH is pointing to ORACLE_HOME/jdbc/lib

      what else needs to be checked? classes12.zip is located at ORACLE_HOME/jdbc/lib

      Thanks in advance.
      MSR
        • 1. Re: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9
          Avi Abrami
          MSR,
          Have you printed out the value of "java.library.path"? Have you verified that it points to "ORACLE_HOME/lib"? Does that directory contain "ocijdbc9"?

          But I don't understand why it's complaining about "ocijdbc9" when your stack trace mentions:
          at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:265)
          Good Luck,
          Avi.
          • 2. Re: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9
            480515
            This is my java.library.path

            echo $JAVA.LIBRARY.PATH
            java -server -Xms64m -Xmx512m -XX:+OverrideDefaultLibthread .LIBRARY.PATH

            Thanks
            • 3. Re: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9
              Avi Abrami
              MSR,
              For me, both on Red Hat Enterprise Linux ES release 4 and Solaris 9, setting the LD_LIBRARY_PATH environment variable to $ORACLE_HOME/lib correctly adjusts the "java.library.path" [System] property.

              On both these systems there is a "libocijdbc<version>.so" file (where <version> means the installed Oracle version -- so if you are running Oracle 9i, the file will be "libocijdbc9.so") in the $ORACLE_HOME/lib directory.

              In order to verify "java.library.path", in your java code, add the following:
              System.out.println(System.getProperty("java.library.path"));
              Good Luck,
              Avi.
              • 4. Re: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9
                586926
                Pls can someone help me out. I have a similar problem to the one raised in this thread.

                I want to install 10g Release 2 on a RHEL AS4 Production IBM server. I've followed the installation guide to the letter!

                I keep getting this error:

                [oracle@pencomlx2 database]$ ./runInstaller
                Starting Oracle Universal Installer...

                Checking installer requirements...

                Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                Passed


                All installer requirements met.

                Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-07-08_04-07-07PM. Please wait ...[oracle@pencomlx2 database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-07-08_04-07-07PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
                at java.lang.ClassLoader.loadLibrary0(Unknown Source)
                at java.lang.ClassLoader.loadLibrary(Unknown Source)
                at java.lang.Runtime.loadLibrary0(Unknown Source)
                at java.lang.System.loadLibrary(Unknown Source)
                at sun.security.action.LoadLibraryAction.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
                at sun.awt.DebugHelper.<clinit>(Unknown Source)
                at java.awt.Component.<clinit>(Unknown Source)


                Pls can someone help out b4 i loose my mind!

                Kwex.