Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to fix the "no ocijdbc21 in java.library.path" error with SQLcl 20.4?

User_IEJ6ZApr 20 2021

I am getting a "no ocijdbc21 in java.library.path" error when I try to connect to my Always Free ATP database using SQLcl 20.4. It is working fine with SQL Developer but I have it pointed to the Oracle Wallet.
Here's what I did:
C:\Users\jeanf>sql -oci

SQLcl: Release 20.4 Production on Tue Apr 20 13:15:03 2021

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

Username? (''?) apps@db202103261753_high
Password? (**********?) ***************
USER = apps
URL = jdbc:oracle:oci8:@db202103261753_high
Error Message = no ocijdbc21 in java.library.path
USER = apps
URL = jdbc:oracle:thin:@db202103261753_high
Error Message = IO Error: Unknown host specified (CONNECTION_ID=pMxks3uYQx6vXadE2EC/OQ==)
USER = apps
URL = jdbc:oracle:thin:@db202103261753_high:1521/db202103261753_high
Error Message = IO Error: Unknown host specified (CONNECTION_ID=WdVASXCLScy/SnIYnLl0ig==)

It does not work even if I specify the port (apps@db202103261753_high:1522) as per tnsnames.ora found in the Oracle Wallet (.zip).
So, where could I set this java.library.path, if that could fix the issue?
Thank you,
JF

This post has been answered by User_IEJ6Z on Apr 20 2021
Jump to Answer

Comments

User_IEJ6Z
Answer

I fixed the problem by following the instructions under section "SQLcl with a JDBC Thin Connection" in https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/connect-sqlcl.html#GUID-AC24404D-8D0B-4716-83F6-F0F501318011. It worked as soon as I executed sql /nolog with set cloudconfig pointing to my Oracle Wallet (.zip). It is the exact same Oracle Wallet that I used with SQL Developer.
I was following the instructions under the previous section entitled "SQLcl with Oracle Call Interface". I found this paragraph misleading by the last sentence which states "When connecting using Oracle Call Interface, the Oracle Wallet is transparent to SQLcl". I thought that sql -oci would figure out about the Oracle Wallet.

Marked as Answer by User_IEJ6Z · Apr 20 2021
1 - 1

Post Details

Added on Apr 20 2021
1 comment
30,093 views