tags:

views:

157

answers:

0

This error is related to an SDK I am trying to use. Specifically the Oracle Calendar SDK. Man do I hate Oracle with a passion right now. I've done a lot of searching in regards to this error, and a lot of the fixes revolve around issues with people who have written their own DLL and need to make changes to get it working with JNI properly. In my case I cannot recompile the DLL, and all I can do is assume a company like Oracle released something that actually works. A large assumption I know. (BTW the code in question is Oracle's included demo code)

Here is the error from Eclipse:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\product\10.1.2\ocs_1\ocal\lib\csdkjni.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at oracle.calendar.sdk.Api.loadJniLib(Unknown Source) at oracle.calendar.sdk.Api.init(Unknown Source) at calendardemo.CalendarSession.init(CalendarSession.java:46) at calendardemo.CalendarSession.(CalendarSession.java:26) at calendardemo.CSDKDemo.main(CSDKDemo.java:23)

I've search and looked through every Oracle thread, every JNI troubleshooting page, used dependency walker on csdkjni.dll, etc.

I'm trying to compile this in eclipse IDE, on Windows XP. Here is my JVM command line argument: -Djava.library.path="C:\product\10.1.2\ocs_1\bin;C:\product\10.1.2\ocs_1\ocal\lib;C:\product\10.1.2\ocs_1\ocal\jlib"

(csdkjni.dll and it's dependency capi.dll are in the \ocal\lib directory)

The jlib and bin directories are there because I saw the suggestion somewhere in my searching. Everything works the same with just the lib directory also. It's obviously finding the csdk.jar and it's finding csdkjni.dll also, but not one of its dependencies. According to dumpbin.exe it's dependencies are:

capi.dll MSVCRT.dll KERNEL32.dll

Everything is found when I run dependency walker. capi.dll is located in the same directory as csdkjni.dll. This directory has been added to my system's PATH environment variable. I've also tried putting capi.dll in every folder I could think of with no luck. I'm totally out of ideas and cannot believe I've lost an entire day just trying to get the demo to compile. Does ANYONE have a clue whats going on here?

Is it possible that this error message is just not correct and that its actually having a problem loading some function from the DLL? I did see some things in dependency walker relating to some windows DLLs very far down in the tree, but after googling them they seemed like common occurences and generally not at the root of similar issues.