问题
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
- Advanced
- Database
- Preferences
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:
Rename the C:\Users\username\AppData\Roaming\JDeveloper\System folder
Run the Project from Jdeveloper
Close the Jdeveloper
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