1 2 Previous Next 23 Replies Latest reply on Jun 1, 2020 3:11 PM by rjsosi

    Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer

    rjsosi

      Hi,

       

      We're using Oracle 12c.

       

      I initially installed SQL Developer 19.2.1.247 on my local laptop.

      I set up my Oracle instance and was able to log in via localhost as well as all the tnsnames entries I'd set up.

      Months later I'm now getting an error that prohibits me from being able to log into Oracle.

       

      The full error is the following:

       

      java.lang.Error: Incompatible version of libocijdbc[Jdbc:122010, Jdbc-OCI:121020
      at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:4161)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:4154)
      at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:453)
      at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
      at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:60)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
      at oracle.jdeveloper.db.adapter.AbstractConnectionCreator.getConnection(AbstractConnectionCreator.java:222)
      at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnectionImpl(RaptorConnectionCreator.java:399)
      at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnection(RaptorConnectionCreator.java:118)
      at oracle.dbtools.raptor.dialogs.conn.ConnectionPrompt.promptForPassword(ConnectionPrompt.java:67)
      at oracle.jdevimpl.db.adapter.DatabaseProviderHelper$PasswordPrompter.promptForPassword(DatabaseProviderHelper.java:422)
      at oracle.jdevimpl.db.DBConnAddin$2.promptForPassword(DBConnAddin.java:89)
      at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:377)
      at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:354)
      at oracle.jdevimpl.db.adapter.CAConnectionCreator.createConnectionImpl(CAConnectionCreator.java:51)
      at oracle.javatools.db.DatabaseFactory.createConnection(DatabaseFactory.java:838)
      at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:282)
      at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:657)
      at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.getDatabase(Connections.java:287)
      at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1183)
      at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1169)
      at oracle.dbtools.raptor.navigator.db.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:83)
      at oracle.dbtools.raptor.navigator.db.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:38)
      at oracle.dbtools.raptor.navigator.db.BaseConnectionNode.getConnection(BaseConnectionNode.java:91)
      at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode.getObjectFactory(DatabaseTreeNode.java:90)
      at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:145)
      at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:119)
      at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      

       

      Where can I find out what version of llibocijdbc is being used by SQL Dev 19.2.1.247?

       

      Also does this look like my main issue?

       

      Here's the actual logon screen below.

       

        • 1. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
          Glen Conway

          Did you always use OS authentication for this specific connection definition?  I suppose it should not matter, but I almost always use Default authentication.  The error occurs when there is a mismatch between the Oracle client and the ojdbc8.jar that SQL Developer ships with.

           

          The simplest way to avoid this error?  Do not request an OCI/Thick JDBC connection so that configuring SQL Developer to use a matching Oracle client is not required.  I suppose, however, that OS authentication requires it, so you cannot do something as simple as uncheck the Database > Advance preference checkbox for "Use OCI/Thick driver"

          Capture2.jpg

          Instead, you must configure SQL Developer to use an Oracle full or instant client compatible with the jdbc\lib\ojdbc8.jar that ships with your version of SQL Developer.  For example, SQL Developer 19.2.1 ships with the 18.3 version while 19.4 ships with the19.3 version.  You should check to see which Oracle client (full or instant) your SQL Developer is configured to use, if any.  And when you do configure the client, make sure to click on the Test... button and verify there are no errors. Most common error is not to prefix your PATH environment variable with the Oracle client location.

           

          I use Oracle 11g XE instead of Oracle 12, but here is an OS authentication connection working (whups, see the Edit below) in my Windows 10 environment:

          Capture4.jpg

          With this result upon connecting:

           

          Capture3.jpg

          Hope this helps

           

          Edit:  Actually, I guess the connection is still using the (greyed out) username and password provided in my Default authentication. In trying to configure my specific edition of Windows 10 to actually use OS authentication, I am not able to add an ORA_DBA user group to apply to my OPS$<DomainName>/<Username>, so I really get an insufficient privileges messages.  Sorry I am not able to fully test the scenario.

          • 2. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
            rjsosi

            Hi Glen,

             

            Here is my ojdbc8.jar file.

             

            How can I tell which version it is?

             

             

            • 3. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
              rjsosi

              Also I removed and deleted the old ojdbc.jar driver , downloaded an 18.3 version file and installed it and I'm still getting the same error.

               

              Just an FYI. I had 3 different log ins configured. BasicallY I configured the three ways you could log in from SQL developer.

               

              I'm still getting the same error with all three

               

              Here they are below.

               

               

               

              • 4. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                Glen Conway

                How can I tell which version it is?

                Well, I seriously doubt your Database preference's Third Party JDBC Drivers list is where SQL Developer gets the preferred, Oracle (non-Third Party) JDBC driver.

                 

                Considering how SQL Developer actually does pick which Oracle JDBC driver to use, the cases are:

                 

                1) The ojdbc8.jar your SQL Developer ships with.  Use some zip/unzip utility like 7-Zip to open the jar, then find the version contained within the MANIFEST.MF file:

                Capture.JPG

                2. The ojdbc8.jar in the Oracle (full or instant client) you have configured in your Database > Advanced preference (as shown in the first image of my first post for this discussion):

                Capture1.JPG

                Let me repeat (and correct) the comment I made in that first post about configuring SQL Developer to point at a specific Oracle client in order to override use of the default ojdbc8.jar shipped with SQL Dev:

                Instead, you must configure SQL Developer to use an Oracle full or instant client compatible with the jdbc\lib\ojdbc8.jar that ships with your version of SQL Developer minimum version of Java required by the SQL Developer version.  For example, SQL Developer 19.2.1 ships with the 18.3 version while 19.4 ships with the19.3 version.  You should check to see which Oracle client (full or instant) your SQL Developer is configured to use, if any.  And when you do configure the client, make sure to click on the Test... button and verify there are no errors. Most common error is not to prefix your PATH environment variable with the Oracle client location.

                So if you are getting an "Incompatible version" error it just mean these two things:

                1) The PATH environment variable points to an Oracle client with an incompatible version of ocijdbc*.dll for the ojdc8.jar SQL Developer is configured to use, and

                2) You either: a) explicitly configured SQL Developer to use an OCI/Thick JDBC driver;  or b) the specific connection definition requires the use of an OCI/Thick JDBC driver.

                 

                Check your PATH environment variable

                 

                Hope this helps

                • 5. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                  rjsosi

                  I should have done this after your first post.

                   

                  I  used the help screen to find the version of java this app runs and got the following.

                   

                   

                  I also listed out the paths where the ojdbc8.jar file would be. My guess was the java home dir but when I went there I couldn't find any ojdbc8.jar file.

                  Do you know which directories I should look in?

                   

                   

                  Finally I went through all the ojdbc8.jar files on my machine and found the following list.

                   

                  None of these firstories match up with any of the directories in the Properties panel from above.

                  Would you kn ow which of these directorie I might focus on. Again, the closest one I can find is the

                   

                  "C:\Users\bscheid\Oracle\sqldeveloper\jdk\" directory but again it's not an exact match.

                   

                  Please let me know what you think.

                   

                  Thanks again.

                  • 6. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                    rjsosi

                    Here's something else.

                     

                    I was able to go through each version of ojdbc8.jar file on my machine and I found the following.

                     

                    All the ojdbc8.jar files highlighted in red are versions 12.2.0.1.0.

                     

                    All the other versions are 8.3.

                     

                    When I try to log in to any of the ORacle links on my SQL Developer tool I get the same message namely:

                     

                     

                    If you look at the message in red , it's saying it's having trouble with the [Jdbc 122010] or java version 12.2.0.1.0.

                     

                    So this app is reading its jave from one of those directories highlighted in red.

                     

                    So Now my ONLY question is :

                    How do I point SQL developer to read from one of the 8.3 directories in stead?

                     

                    If I get that question answered, I can solve my issue!

                     

                    Thanks!

                    • 7. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                      Glen Conway

                      By default SQL Developer uses the Thin JDBC it ships with (as ojdbc8.jar in your installation's sqldeveloper\jdbc\lib directory). But it looks like you want to use the OCI/Thick type.

                       

                      To do that, you can override it using a Database > Advanced preference, the Configure... button for the Use Oracle Client option + Use OCI/Thick driver checkbox:

                      Capture1.JPG

                      Note that I downloaded and installed (unzipped) an 18.3 Oracle Instant client into my C:\app\<userID> directory. I assume SQL Developer 18.3 supports only 12.2.0.1 (not 12.1.0.2 as the "Incompatible version of libocijdbc[Jdbc:122010, Jdbc-OCI:121020" message indicates) and above drivers up to and including the 18.x drivers, but not the latest 19.x drivers.  You need to...

                      1) Install the latest 18.x Oracle Instant client. (for downloads, see https://www.oracle.com/database/technologies/instant-client/downloads.html)

                      2) Configure the Database > Advanced preference to use it (as I said in my original post for this discussion)

                       

                      If you do that correctly, then the Help > About > Properties will show (searching for jdbc) that as the location of your ojdbc8.jar

                      Capture.JPG

                       

                      And if you search for oci next, you can verify whether of not your the Use OCI/Thick driver configuration worked or not.  If yes, the oci flag value will be true.

                       

                      Hope this helps

                      • 8. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                        rjsosi

                        OK, so here's my issue then . I downloaded the 18.5 instant client because I couldn't find 18.3.

                         

                        Does it have to go into the C:\app directory or are we just trying to find a directory that's in the java path?

                         

                        Which instant client do I want.? There's basic package, JDK, ODBC, SDK,SQL Plus.... Which one?

                         

                        Also I downloaded all of them basically and put them in just an arbitrary directory, not really in the java path.

                         

                        So when I tested the connection I got the error message below:

                         

                        Status : Failure -Test failed: no ocijdbc18 in java.library.path
                        

                         

                         

                        What do I need to do?

                        • 9. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                          thatJeffSmith-Oracle

                          you can put it anywhere you want - just make sure you update your path afterwards as indicated by the installation notes/instructions

                          • 10. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                            Glen Conway

                            As I noted a couple of times before in this discussion, and thatJeffSmith-Oracle also mentioned, your PATH environment variable needs to include the Oracle client directory. I guess the doc says the one you really want to use must appear before any other Oracle client directories that may happen to already be in PATH.  I usually just prefix PATH with the one I configured SQL Developer to use in the Database > Advanced preferences.

                             

                            Just as we see that the Help > About > Properties tab (search for jdbc.lib) displays the Oracle client's ojdbc8.jar location for its value, if you search for java.lib you can see the value of java.library.path looks like it is constructed from the (SQL Dev installation bin directory + some Java directory + PATH).

                             

                            As for which components of the Oracle Instant client to download and unzip, my rule (due to necessity or just paranoia?) is:  basic +  jdbc + sqlplus.

                             

                            Cheers

                             

                            Edit: And I include sqlplus not because SQL Developer needs it, but just in case I want to compare SQLcl behavior vs SQL*Plus behavior.

                            • 11. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                              rjsosi

                              OK, so I put the directory my Instant client wa in at the beginning of my path variable:

                               

                              PATH=C:\LOCAL\ojdbc8-full;C:\app\client\product\12.1.0\client_1\bin;C:\app\rscheid\virtual\product\12.2.0\dbhome_1\bin;C:\Program Files (x86)\Micro Focus\Extra!\;C:\Program Files (x86)\RSA SecurID Token Common;C:\Program Files\RSA SecurID Token Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\SASHome\x86\Secure\ccme4;C:\Program Files\SASHome\Secure\ccme4;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files (x86)\Attachmate\RSecure\;C:\Program Files (x86)\Brackets\command;C:\PROGRA~2\IBM\SQLLIB\BIN;C:\PROGRA~2\IBM\SQLLIB\FUNCTION;C:\PROGRA~2\IBM\SQLLIB\SAMPLES\REPL;C:\Users\rscheid\Documents\instanclient_19_3_32;C:\Users\rscheid\Documents\instantclient_19_3;C:\ORACLE\11.2.0\bin;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Adaptiva\AdaptivaClient\bin\x32;C:\Program Files (x86)\Adaptiva\AdaptivaClient\bin\x64;C:\Users\bscheid\AppData\Local\Microsoft\WindowsApps;

                               

                              I then verified that's what SQL developer was pointing to:

                               

                              I rebooted my machine. Got back in to SQL Developer and then tested the connection again.

                               

                              I got the following message:

                               

                              Status : Failure -Test failed: no ocijdbc18 in java.library.path
                              

                               

                              Now just an FYI here are the contents of the c:\LOCAL\ojdbc8-full directory:

                               

                               

                              So what did I miss?

                              • 12. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                                Glen Conway

                                It is good that your PATH environment variable begins with the Instant Client location as defined in the Database > Advanced preference.

                                 

                                But the actual listing looks a bit flaky.  You show us the contents under "Now just an FYI here are the contents of the c:\LOCAL\ojdbc8-full directory".  But it looks like c:\LOCAL\ojdbc8-full contains another ojdbc8-full directory, and that looks rather strange. 

                                 

                                Based on your latest error message, the problem is that the Instant Client directory must contain both the ojdbc8.jar and the ocijdbc18.dll files and, according to what I can see of your listing, that does not seem to be true.  If I search for *jdbc* in my Oracle 18.3 Instant Client directory, I can see both:

                                Capture.JPG

                                Hope this helps

                                • 13. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                                  rjsosi

                                  Hi Glen,

                                   

                                  The additional ojdbc8-full directory just served as a backup as I combined the contents of all the different versions of the instant client 18.5 downloads into a single directory.

                                   

                                  This was just incase a file from the odbc version overwrote any file from the jdbc version etc...

                                   

                                  I hadn't installed the SQL Plus version until just now. When I looked inside that zip file I couldn't find any reference to a ocijdbc18.dll file.

                                   

                                  I've looked in all three zip files I still can't find any reference or the existence of an ocijdbc18.dll file. (Actually 4 because I also downloaded the jdbc version of instant client as well.)

                                   

                                  This makes me wonder, the closest instant client I have available to me is 18.5. So the client you said you downloaded was 18.3. but was it really 18.3?

                                   

                                  If so the why is it not in the list of available instant client versions to download?

                                   

                                  The other questions would be did you type 18.3 but meant 18.5? The reason this is pertinent is if there is a 18.3 version and you have it in your possession than does any of the versions, that being either "basic +  jdbc + sqlplus." from your comment:

                                   

                                   

                                  As for which components of the Oracle Instant client to download and unzip, my rule (due to necessity or just paranoia?) is:  basic +  jdbc + sqlplus.

                                   

                                  Then which of those downloads contains the ocijdbc18.dll file?

                                   

                                  This could be the situation here. Please let me know.

                                   

                                  Thanks again!

                                  • 14. Re: Getting <"Incompatible version of libocijdb"> error trying to connect to local Oracle instance vi SQL Developer
                                    rjsosi

                                    Also I just found something. Check this link out:

                                     

                                    https://support.oracle.com/knowledge/Middleware/2441601_1.html

                                     

                                    It's essentially saying there's a relationship between loading the 18.3 instant client and the error message I'm getting which is"

                                     

                                    Status : Failure -Test failed: no ocijdbc18 in java.library.path

                                     

                                    Although this error message is being gotten when someone HAS the 18.3 instant client it still appears around the existence of an ORacle 18.x instant client.

                                     

                                    Might there be another cause for this? Just an FYI...

                                    1 2 Previous Next