no ocijdbc12 in java.library.path

我是研究僧i 提交于 2019-12-06 16:47:56

问题


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.


回答1:


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!




回答2:


To use the oracle OCI driver you should have the relevant dlls in your java library path.

https://docs.oracle.com/cd/B28359_01/java.111/b31224/instclnt.htm#CHDIHGEF

Make sure to reference the correct release, both in term of 32/64 bit and version number.




回答3:


This worked for me:

  1. Rename the C:\Users\username\AppData\Roaming\JDeveloper\System folder

  2. Run the Project from Jdeveloper

  3. Close the Jdeveloper

  4. Rename back the System folder and try running the project and update the mapping in VO




回答4:


it has been resolved by setting oracle client Tools->Preference->Database->Advanced->Use Oracle client->(choose path of oracle client) ex: Instant Client: file:/C:/Oracle/product/11.2.0/client_3/




回答5:


For JDeveloper 12c, if you come across this issue set up an environment variable referring to ojdbc jar"

-J-Djdbc.library=\ojdbc6.jar"




回答6:


I had a similar situation.

The solution turned out to be to enter the connection property and from this level to reconnect.

I will add that the problem appeared after the installation of oracle express during which an error occurred and the installation was not completed



来源:https://stackoverflow.com/questions/27445610/no-ocijdbc12-in-java-library-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!