-
1. Re: UnsatisifiedLinkError with system library
jonlee Oct 28, 2003 3:44 PM (in response to jch_14_5)Your JNI problem probably stems from the fact the dll does not reside in your library path. I'm a bit rusty with Windows JNI but I believe the dll needs to be somewhere specified by the PATH environment variable. You can get an idea of what is applicable for your JBoss environment by the following line in your Java code:
System.out.println(System.getProperty("java.library.path"));
Hope that helps. -
2. Re: UnsatisifiedLinkError with system library
jch_14_5 Oct 29, 2003 2:28 PM (in response to jch_14_5)thanks but my path is fine, as i mentioned this works running under tomcat and stand alone. The funny thing is that i when i call System.loadLibrary("libname") i get no exception. I only get an unsatisfied link error when i call a method on it. By the way i am not trying this from an ejb - just a regular java class.
Thanks again for any ideas -
3. Re: UnsatisifiedLinkError with system library
jonlee Oct 29, 2003 4:35 PM (in response to jch_14_5)Are there any dependencies on the dll? And did you print the library path just before you did the load or better, just before you make the method call? I would compare that with what you get in the standalone Tomcat to get an idea if there is any mangling occurring. Also, there have been observed to be problems with servlets/JSP executing native libraries under certain conditions. Have you tried System.Load providing a full path to the dll? Another suggestion has been to put the dll in Windows\System32\.
Were there any other bits of information contained with the error? A stack trace might help. Do you get a sense of what caused the problem - I can not find dependent libraries? I can not find a file?