Java – no ocijdbc10 in java.library.path

eclipsejavajdbcoracle

So I've been plagued by this issue, whenever I try to run my app in eclipse, I get this error.

2011-02-23 09:55:08,388 ERROR (com.xxxxx.services.factory.ServiceInvokerLocal:21) - 
java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path

I've tried following the steps I found here with no luck. I've tried this on a XP VM as well as windows 7 (although in win 7 I get a different error, below)

java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path

I've made sure my oracle client was ok (by running TOAD) and I also re-added the classes12.jar / ojdbc14.jars to my WEB-INF/lib folder taken directly from my %ORACLE_HOME% folder (also re-added them to the lib path). I've also tried just adding the ojdbc14.jar without the classes12.jar. Any suggestions appreciated.

In the XP VM I have my PATH variable set to C:\Program Files\Java\jdk1.6.0_24\bin;C:\ORACLE\product\10.2.0.1\BIN. I'm using Tomcat server 5.0

Best Answer

I agree with the advice you've gotten in the comments to use the thin driver instead of the OCI driver if you can. It is simpler and it should bypass the problem you're having.

If you do need the OCI driver for some reason, your problem is that the DLLs are not on your Java library path. This is separate from the classpath that is used to locate class definitions. The clues here are (a) the fact that the error references java.library.path, and (b) the fact that you are getting an UnsatisfiedLinkError rather than a ClassNotFoundException.

You would need to set your java.library.path property to include the location of the DLLs, or add the location of the DLLs to the Windows PATH, in order for Java to locate them.

More information here: http://forums.oracle.com/forums/thread.jspa?threadID=615281

Related Topic