Java Exception: java.lang.UnsatisfiedLinkError: ocijdbc11.dll:% 1 is not a valid Win32 application

I am trying to establish a connection with oracle through a java program. Below is the configuration.

  • Windows 7, 64 bit.
  • Jdk 1.6
  • Oracle 11g R2 Client, 64 bit.
  • ojdbc6.jar in the class path of my standalone application.

But I get the following exception - " java.lang.UnsatisfiedLinkError: \ bin \ ocijdbc11.dll:% 1 is not a valid Win32 application "

I googled a lot, but could not find a solution.

Please help me solve this problem.

Thanks in advance.

+6
source share
3 answers

This error seems to be related to the compatibility of the OCI driver version with the Windows version.
Check if your OCI driver is compatible with the 32-bit architecture as well as the 64-bit one (and therefore errors).

Here (https://forums.oracle.com/forums/thread.jspa?threadID=2189215) you can find a closely related error (the same error for another library), which was finally fixed when loading a specific SO library version and reinstallation.

EDIT : so after your version it seems that you need to install the 64-bit JDK and run the application on it, since your driver and your OS are aligned (64 bits).

+1
source

This error can also occur from the 64-bit version of Java 7 and using 32-bit Oracle drivers. The application I used was supposed to use 32-bit Java 6, but the administrator installed Java 7, which apparently caused this error.

0
source

This error only occurs on Windows, to allow just copying your dll to C: \ Windows \ System32, it works for me!

0
source

Source: https://habr.com/ru/post/906278/


All Articles