Jboss server cannot load 3rd party native libraries
Issue
We are getting java.lang.UnsatisfiedLinkError when trying to load 3rd party native libraries through -Djava.library.path
within EAP.
Here's the error message and the code block that is throwing the error
java.lang.UnsatisfiedLinkError: /usr/share/jbossas/bin/native/native_app/utl/libtaxcommon.so: libtaxcommono.so: cannot open shared object file: No such file or directory
Java code:
try {
if (!useDummyResult) {
System.loadLibrary("taxcommon");
}
}
/* System exit was removed so we don't kill JVM */
catch (UnsatisfiedLinkError e) {
System.err.println("Can't find library libtaxcommon.so/taxcommon.dll");
e.printStackTrace();
throw new UnsatisfiedLinkError("Can't find library libtaxcommon.so/taxcommon.dll.");
/* System.exit(-1); */
}
The Application is designed by a 3rd party. The contents of the application, and it's utility libraries are as follows:
[jboss@hostname native]$ ls -lrt native_app/utl
-rwxrwxrwx. 1 jboss jboss 9711 Jul 16 10:09 libtaxcommon.so
...
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.