-1

I've:

  • Windows 7 x64
  • My 11G Oracle client as per below C:\Oracle\product\11.2.0\client_1
  • My SQL Developer (downloaded the kit with JDK 8 included, but installed the JSK separately just in case) dir as per below C:\sqldeveloper

When I try to connect using TNS I have

no ocijdbc12 in java.library.path

If I go to Settings -> Database -> Advanced and choose my Oracle dir manually I get this:

Testing the Oracle Home located at C:\Oracle\product\11.2.0\client_1 Testing client directory ... OK Testing loading Oracle JDBC driver ... OK Testing checking Oracle JDBC driver version ... Failed: Minimum driver version 11.2.0.3 required, specified driver version is 11.2.0.1.0

So I looked into upgrading the JDBC driver, but I can't use the check for updates feature, since it appears to be blocked in my virtual machine.

I got the ojdbc7.jar from the SQL developer directory and copied it to C:\Oracle\product\11.2.0\client_1\jdbc\lib, and now I get the error below:

Testing the Oracle Home located at C:\Oracle\product\11.2.0\client_1 Testing client directory ... OK Testing loading Oracle JDBC driver ... OK Testing checking Oracle JDBC driver version ... OK Driver version: 12.1.0.2.0 Testing testing native OCI library load ...

Failed: Error loading the native OCI library The native OCI driver could not be loaded. The system propertyjava.library.path contains the entries from the environment variable PATH. Check it to verify that
the expected native library directory

C:\Oracle\product\11.2.0\client_1\bin is present and precedes any other client installations. java.library.path = C:\sqldeveloper\jdk\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Oracle\product\10.2.0\client_1\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Oracle\product\11.2.0\client_2;C:\Oracle\product\11.2.0\client_2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ARQDISP\;C:\Program ;.

Have no idea what I'm doing at this point. Could you please help?

Tiago
  • 1,116
  • 5
  • 25
  • 39
  • Could you just try to download the latest 11g JDBC driver from Oracle: http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html? – Mick Mnemonic Feb 25 '17 at 00:11
  • @MickMnemonic what do I donwload and how do I install it? – Tiago Feb 27 '17 at 09:46
  • The link is in my comment above. To install, you just replace the existing jar with the new one, or if you're using Maven, update the version in your POM. – Mick Mnemonic Feb 27 '17 at 16:41

6 Answers6

1

Its missing drivers. So in my case I installed Oracle Client from http://www.oracle.com/technetwork/topics/winx64soft-089540.html and set the path variable accordingly.

Here's a blog post that shows how to tell SQL Developer where and which installed client to use :

https://www.thatjeffsmith.com/archive/2014/01/oracle-sql-developer-4-and-the-oracle-client/

Restart your SQL Developer.

Kris Rice
  • 3,300
  • 15
  • 33
Rajesh Goel
  • 3,277
  • 1
  • 17
  • 13
0

I had similar issue. Moving from sqldeveloper 4.0 to 4.1, imported all my connections, but in 4.1, I would get 'no ocijdbc12 in java.library.path'. I opened up my current connections (right-click on any connection and choose properties) all of which the connection Type is TNS.
The 'Connect Identifier' was checked with the connections network alias name entered there.
I checked on the 'Network Alias' check box and selected the same name and then the connection worked.
I went back to 4.0 to examine my connections there and it appears that the alias name works fine with the 'Connect Identifier' selected but not in 4.1 I had to update all my many connections to use 'Network Alias'.

beakerchi
  • 107
  • 3
  • 8
0

Error loading the native OCI libraryThe native OCI driver could not be loaded and when trying to connect to a database i was getting no ocijdbc12 in java.library.path

For me the error was solved after i have created a new variable ORACLE_HOME with the value ....(path of the folder where the sql developer was insataled)\jdk\jre. Then i have added at the begging of the Path variable %ORACLE_HOME%\bin.

At first i have created a system variable that was pointing to the folder of the installation of the dev express and that was not working

0

For database selecting the connection properties and changing the connection type from TNS to Basic and providing the other details (Service name/SID) for the connection resolved the issue for me

0

Maybe it helps having a look into answer of my post about similar topic:

How to get Sqldeveloper 19.1 64-bit working with instantclient_12_2 on Windows enterprise PC without admin privileges?

The mentioned .bat file shows all you need. If you have admin privileges or permissions to change any environment variables, then it will probably be the better way without using .bat file.

D. Lohrsträter
  • 306
  • 3
  • 9
0

When I try to connect using TNS I have

no ocijdbc12 in java.library.path

It is so stupid and funny, at the same time, what I found.

I get the same error and the only difference between when it is OK and when is not is...

the TNS definition in tnsnames.ora

Simply add (maybe once again if it disappeared) the TNS definition of your database, like:

XE.WORLD=
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=localhost)
      (PORT=1521)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=XE.WORLD)
      (SERVER = DEDICATED)
    )
  )

and restart SQL Developer.

Connection configuration will keep the name (XE.WORLD) even if it is already gone from tnsnames.ora. If it is not there, on the connection attempt, it will return that misleading error.

My setup: SQL Developer 4.1.4.21, ojdbc8.jar, connection to Oracle 19c.

Community
  • 1
  • 1
Piotr Kepka
  • 318
  • 3
  • 5