• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

UnsatisfiedLinkError in JBoss while calling a JNI method

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/).
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic