Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsatisfiedLinkError in JBoss while calling a JNI method

 
Ravi Choudhari
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting the UnsatisfiedLinkError when calling a JNI method in JBoss 5.1

The required .dll file is in LD_LIBRARY_PATH

I have also set jna.library.path & java.library.path to the directory which has the required .dll

I have also tried to place the dll in windows\system32, jre6\lib\ext, jdk\jre6\lib\ext and jboss\bin, but getting the same error.

But there is no error if I call the methods from a standalone java application.

Also, The same method call is working perfectly in Tomcat if the dll is copied to windows\system32.


Thanks,
Ravi
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LD_LIBRARY_PATH is not used on Windows. The DLL should either be in the PATH or be in the java.library.patch system property. Check run.bat for setting java.library.path.
 
Ravi Choudhari
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DLL is in the PATH & in java.library.path, also it is present in bin directory of jboss. But still getting same error.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set _JAVA_LAUNCHER_DEBUG (you can set it to anything). Then start the app server. The JVM loader will dump some stuff to the console. Make sure that the java.library.path setting gets dumped and that it includes the directory containing you DLL.

If that does not help you resolve the problem, post the full path name for the DLL and post what was output to the console.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One other thought - does the DLL depend on other DLLs and are those DLLs also in the PATH? One way to check this is to use the Dependency Walker tool (http://www.dependencywalker.com/).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic