6 Replies Latest reply on Jun 11, 2020 7:05 PM by bddda057-7788-423a-9ec8-0ed2a5d6a3c0

    Local connection library error

    4218299

      Hello, I have installed the SQLDeveloper with a jdk8 on my Mac running on Catalina, however when I try to connect to the local database I get this error:

       

      no ocijdbc18 in java.library.path

       

      I was trying to avoid this by changing default Java home path, but that didn't work for me. I don't have any idea, what else to do and I am a bit confused, because I know there is surely a way to fix this. Is there somebody with any suggestions, please?

      Maybe also worth to mention, that I don't get this error, when connecting to basic remote database.

       

      Thank you a lot, Sam

        • 1. Re: Local connection library error
          Glen Conway

          Check out this prior discussion that asks the same question, but for WIndows:  no ocijdbc18 in java.library.path

           

          Use the same general instructions, but download the 18.x Oracle Instant client for Mac instead for you specific hardware, probably only

          https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html , since Mac's with Power PC are ancient and have 10.1.0.3 client available.

          • 2. Re: Local connection library error
            4218299

            Hello, I've read this post before, but I don't know, what do you mean by setting ORACLE_HOME path. What file should I edit? I was trying to set it in sqldeveloper.sh, I set it to correct path to instant client 18, but it did nothing. My original sqldeveloper.sh file looks like this:

            #!/bin/bash

            TMP_PATH=`/usr/libexec/java_home -F -v 1.8`

            if [ -z "$TMP_PATH" ] ; then

              TMP_PATH=`/usr/libexec/java_home -F -v 11`

              if [ -z "$TMP_PATH" ] ; then

                TMP_PATH=`/usr/libexec/java_home -F -v 12`

                if [ -z "$TMP_PATH" ] ; then

                  osascript -e 'tell app "System Events" to display dialog "SQL Developer requires a minimum of Java 8. \nJava 8 can be downloaded from:\n http://www.oracle.com/technetwork/java/javase/downloads/"'

                  exit 1

                fi

              fi

            fi

            export JAVA_HOME=$TMP_PATH

             

            if [[ -f $HOME/.sqldeveloper/19.2.1/env.sh ]];

            then

              source "$HOME/.sqldeveloper/19.2.1/env.sh" >> /dev/null

            elif [[ -f $HOME/.sqldeveloper/env.sh ]];

            then

              source "$HOME/.sqldeveloper/env.sh"  >> /dev/null

            fi

             

            here="${0%/*}"

            cd "${here}"

            cd ../Resources/sqldeveloper/sqldeveloper/bin

            bash ./sqldeveloper >>/dev/null

            • 3. Re: Local connection library error
              Glen Conway

              I'm not too much of a Linux guy, but two points:

              1) Do you have a .bashrc shell that sets ORACLE_HOME?

              2) Looking at the script "/home/oracle/sqlcl/bin/sql" in a Oracle Developer Day VM running under Virtual Box, I can see a section that controls that...

              Capture.JPG

              So if ORACLE_HOME is set and exported in your .bashrc, then the sql script should utilize it to get the appropriate ocijdbc file

              • 4. Re: Local connection library error
                4218299

                Hello, so I've done some additional research and I came to a possible solution, which doesn't work again.

                 

                First of all, I have to create environment variable, with a location to your instantclient folder and paste it to the file named sqldeveloper, located at /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin

                The start of the file in my case looks like this:

                #!/bin/bash

                 

                export DYLD_LIBRARY_PATH=/Users/me/Library/instantclient_18_1

                 

                #=============================================================================

                #  Launcher for Oracle SQL Developer

                #  Copyright (c) 2005, Oracle. All rights reserved.

                #=============================================================================

                 

                Now the SQLDeveloper is able to read an instantclient libraries. However these libraries are not longer notarized at the Apple. This means you have to either go to settings and allow access to non trusted developer content multiple times for multiple files, because there are a lot of them, are you have to put it in a quarantine through Terminal, which is a simpler and more elegant solution. It can be done like this:

                 

                1. In the terminal go to the location, where your instantclient is unziped. In my case it's in home library folder:

                 

                cd /Users/me/Library/instantclient_18_1

                 

                2. Paste this command:

                 

                xattr -p com.apple.quarantine libociei.dylib

                 

                3. You will get an output of some numbers and letters separated with semicolons. Change first four characters to 00c1 and paste the whole string to the next command (also put string into double quotes):

                 

                xattr -w com.apple.quarantine "00c1;5e7c91d1;Safari;EE494453-DE0E-4CEA-894E-742AEBBC4E9F"

                 

                4. Now all the libraries are trusted, but here I ran into another error in SQLDeveloper, trying to connect to the local database. It says:

                 

                Incompatible version of libocijdbc[Jdbc:183000, Jdbc-OCI:180000

                ......................................................................................................................................................................................................................................

                 

                Does anybody have any suggestions, what should I do now, please?

                 

                I have never done such a painful installation of a softer. Oracle should've warned about abandonment of a support for OS X and not acting like everything's OK and you can download and install the app properly.

                • 5. Re: Local connection library error
                  Glen Conway

                  Regarding the lack of SQL Developer notarization, here is a prior discussion with a workaround (not sure if there is also an easier way to permit the Instant Client libraries):

                  SQL Developer for macOS does not seem to be properly signed

                   

                  As for the "no ocijdbc18 in java.library.path" and "Incompatible version of libocijdbc" issues, there actually is another very simple solution if  you do not need one of the few extra things the OCI/Thick driver gives you.  Instead, use the jdbc Thin driver.  Just avoid requesting OCI for all Oracle connections (see Database > Advanced preferences, do not check off the Use OCI/Thick driver box ):

                  Capture1.JPG

                   

                  or requesting it for a specific connection definition (Advanced tab. Use OCI checkbox):

                  Capture.JPG

                  • 6. Re: Local connection library error
                    bddda057-7788-423a-9ec8-0ed2a5d6a3c0

                    I am facing the same issue. Has there been any resolution?