I think everyone who has ever worked with JNI has seen this error at some point "UnsatisfiedLinkError The specified procedure could not be found."
I have a problem where I have an existing JNI library ( C++/Windows) that has worked for some time. I recently upgraded the compiler and rebuilt the JNI library. Now I get the above error. The environment has not changed, except for the newly built .dll and maybe some other .dlls that it depends on. The .dll is being found because I debugged from where the Java class calls System.loadLibrary() and the path to the .dll is resolved correctly. The problem comes when the ClassLoader actually tries to load it. I don't understand what "specified procedure" it means. No procedure is even being called. The problem happens when the library is being loaded not when I try to call a native method in the library. I cannot debug any further because I get to the native call that actually does the load and of course I cannot do any more. Is there any way to get more information so that I can figure out what the problem is or maybe someone has had a similar issue and can provide some hints?
I don't know how Barry Andrews solve his problem, but I can share the knowledge how I solve mine :-)
Inside my DLL I used WinAPI function available only in Windows Vista (and later). However I was running the application under Windows XP....
The tool that helps me solving my problem - http://dependencywalker.com Check your DLL with it, and you must NOT have any errors like "At least one module has an unresolved import due to a missing export function in an implicitly dependent module".
It may be OK if you have problems with delay-load modules (missing delay-load dependencies are not a problem as long as the calling DLL is prepared to handle the missing module - see the dependencywalker FAQ)
I think that the "specified procedure" referes to some missing function which your library requires. You can see that in the Dependency Walker.
You can see that LIBINET.DLL in the attached image is highlited with red and when you click on it you can see missing functions. This was because I have used an older version of LIBINET.DLL library.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database