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:
Hope that helps.
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
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?