If you require a ‘thick’ connection in SQL Developer 23.1 running on Windows, you’ll need to either:

  • Use a 21c Client
  • Use the 21c Instant Client with ojdbc11.jar added

SQL Developer 23.1 uses the JDBC API found in ojdbc11 vs ojdb8. While the 21c Client ships with ojdbc11.jar, the Instant Client DOES NOT.

So when you configure SQL Developer 23.1 with an 21c Instant Client, it will fail with something like this when you hit the ‘Test’ button in the preferences.

Testing loading Oracle JDBC driver … Failed:
C:\OracleInstantClient\instantclient_21_3 is not a valid jar file

SQL Developer and our Java/JDBC code base is looking for ojdbc11.jar but it’s not there, only ojdbc8.jar.

The Fix is Simple

  • Download ojdbc11.jar from the 21c distribution
  • Copy it to your Instant Client
  • Restart SQLDev

Download this –

https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html

Copy that file to wherever you have your 21c Instant Client on your machine.

Don’t grab this from 19c, don’t grab this from 23c – it MUST be from 21c.

Start SQL Developer, make your database connection(s).

Then execute as a script this command in a SQL Worksheet –

show jdbc
Look for the oci8 in the Driver URL section.

What my Path and Preferences look like

For the Instant Client to work, to be available to programs like SQL Developer, you have to sort your OS’s PATH.

Note I am editing the System’s PATH environment variable.

Your other questions…

Why do we require a 21c Client and not 19c? Because there are features/fixes there not present in 19c that we require, like for Transparent Application Continuity (TAC). SQL Developer share a ‘commons’ library where connection logic lives that are also used by SQLcl and ORDS, and support for TAC is non-negotiable.

But, there is no 21c Client available for a Mac! Correct, however I expect once 23c is released, an Instant Client will be made available, at least for Intel x86 chip architectures. I can’t make any promises here, so don’t take my word for it, yet.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

17 Comments

  1. There is no OJDBC11.jar for Instant Client 21.12.
    It is not possible to download an older Version of Instant Client (e.g. 21.11).
    If you use Windows there is no solution, because the OJDBC11.jar from the linux package (regard Laurent Scheiders comment) does not work.
    If you want to setup OCI for SQL Developer on Windows, it is not possible with Intant Client 21.12, because there is no OJDBC11.jar.
    Am I right?

  2. > While the 21c Client ships with ojdbc11.jar, the Instant Client DOES NOT
    the latest instant client 21.12 available today ships with ojdbc11 🙂

    $ unzip -l instantclient-basic-linux.x64-21.12.0.0.0dbru.zip */*ojdbc11*
    Archive: instantclient-basic-linux.x64-21.12.0.0.0dbru.zip
    Length Date Time Name
    ——— ———- —– —-
    5245454 09-26-2023 05:15 instantclient_21_12/ojdbc11.jar
    ——— ——-
    5245454 1 file

  3. De Groote Mike Reply

    Hey Jeff a small heads up. When we tried to do a virgin install of sqldev 23.1 and use the download link for the ojdbc11.jar on this page we kept getting an oci error when trying to activate the oci thick connections.
    The file was copied into the new instantclient folder we are using. The error kept mentioning that the file was not found in the path variable in the right place (needs to be in front) .
    Even though we put the location in the path in the beginning before we start sql developer via a bat.
    We were able to solve it by using the ojdbc11.jar file found in the sqldeveloper install folder under /sqldeveloper/sqldeveloper/lib .By copying that file into our instantclient folder the issue was resolved.

  4. Pavol Babel Reply

    Why not… Good question 🙂 I have feeling I have tried in the past (no luck) therefore I sticked back to JAVA bundled with SQL Developer (which is still JDK 11 for Apple Sillicon).
    Now I tried OpenJDK 17.02 and it works like a charm. Thanks for showing right direction 🙂

    SYS@skecbf06v:1530/ESKPFC skecbf06a> sho java
    Java Detail
    ———–
    java.home= /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/jdk
    java.vendor= Oracle Corporation
    java.vendor.url= https://openjdk.java.net/
    java.version= 11.0.18.0.2
    ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–
    os.arch= aarch64
    os.name= Mac OS X
    os.version= 12.4
    path.separator= :
    file.separator= /
    line.separator=

    SQL > host
    Cannot run program “bash” (in directory “/Users/pavolbabel”): error=2, No such file or directory

    =========
    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
    sql /nolog
    SQL > show java
    Java Detail
    ———–
    java.home= /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
    java.vendor= Oracle Corporation
    java.vendor.url= https://java.oracle.com/
    java.version= 17.0.2 # < !ls
    aliases.xml aliases.xml.bak_1 aliases.xml.bak_2 aliases.xml.bak_3 history.log latin2.txt latin2_1.txt netEntries.xml netEntries.xml~

  5. of course it does. I have seen you using OSX with SQLcl. Does it work on your side ( my configuration is OSX 12.4 and SQLCL 23.1)?

    % ls -l /bin/bash
    -r-xr-xr-x 1 root wheel 1326576 May 8 2022 /bin/bash

  6. OSX 12.4 on M2. Still getting this error even in 23.1. Is this a know bug for OSX, or do we have a workaround? On windows working fine…

    SQL> host
    Cannot run program “bash” (in directory “/Users/pavolbabel”): error=2, No such file or directory

    • Pavol BabeL

      Hi,
      I am not complaining about JDBC driver. Using Thin driver, created symbol link from sqlcl driver to my 19.8 instant client, absolutely suitable workarround for me.
      I am complaining of following:

      SQL> host
      Cannot run program “bash” (in directory “/Users/pavolbabel”): error=2, No such file or directory

      I am not able to run host, I have seen fimiliar bug in past.

    • Pavol BabeL

      of course it does. I have seen you using OSX with SQLcl. Does it work on your side ( my configuration is OSX 12.4 and SQLCL 23.1)?

      % ls -l /bin/bash
      -r-xr-xr-x 1 root wheel 1326576 May 8 2022 /bin/bash

    • As you would say, “of course it does”

      SQLcl: Release 23.1 Production on Wed May 10 09:27:52 2023

      Copyright (c) 1982, 2023, Oracle. All rights reserved.

      SQL> !ls *.sql
      ls: *.sql: No such file or directory

      SQL> !ls
      README.md dependencies.txt license.txt sql sql.exe version.txt

      SQL> !uname -a
      Darwin Jeffreys-Mini.lan 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

      SQL> show java
      Java Detail
      -----------
      java.home= /Library/Java/JavaVirtualMachines/jdk-17.0.3.1.jdk/Contents/Home
      java.vendor= Oracle Corporation
      java.vendor.url= https://java.oracle.com/
      java.version= 17.0.3.1

      Although I’m on BigSur (11.4) – never seen the need to upgrade, yet.

    • Pavol BabeL

      ‘ As you would say, “of course it does” ‘ – True 🙂

      OK, as far I can see your have Intel based (x86) Apple computer The second difference I can see you have Oracle JDK 17. I have M2 Macbook Pro and therefore using ARM JDK 11 (I am using that one bundled with SQL Developer). This might be java issue, OSX has special permissions for running external binaries and there might be some issue. So It seems I will be forced to open a SR first, to make oracle support get an eye on it.

Write A Comment