no ocijdbc12 in java.library.path

Darshil Shah picture Darshil Shah · Dec 12, 2014 · Viewed 92.8k times · Source

I am trying to make a connection to oracle through java program using OCI driver.

Following is the configuration.

  • Windows 7, 32 bit.
  • JDK 1.7
  • Oracle client 11g R2.

ojdbc7.jar in the class path of my standalone application. But I am getting following exception:

Exception in thread 'main' java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path

I tried connection using thin driver. For thin driver it is Connection Succeeded. I googled but was not able to figure out the solution.

Please help me solve this problem.

Answer

lyy picture lyy · Apr 18, 2016

I had the same issue, it was just the external folder of the my *.ora files which was not there any more, I pointed to it again via (menu navigation):

  • Tools
    • Preferences
      • Database
        • Advanced
          • tnsnames directory

It solved it!