Hi,
I have built a web servise using JNI under jboss. The JNI loads a native library
static {
Ststem.loadLibr ary("foo");
}
If I starts the jboss server then I do not have any issue however, when I tried to hot-deploy I keep getting the following error:
java.lang.Unsat isfiedLinkError : Native Library WEB-INF/lib/libfoo.so already loaded in another classloader
Since I hot deploy then it tries to load the same library and off course JVM will not allow such thing.
I have read something about it online but none seems to help or hard to follow to be honest with you.
My question has been dealt with this kind of scenario depolying ws in tomcat or jboss? Is there a way I check if it is already loaded then skip it otherwise load it. Or how do people handle such an issue.
I appreciate any kind of tips.
regards,
I have built a web servise using JNI under jboss. The JNI loads a native library
static {
Ststem.loadLibr ary("foo");
}
If I starts the jboss server then I do not have any issue however, when I tried to hot-deploy I keep getting the following error:
java.lang.Unsat isfiedLinkError : Native Library WEB-INF/lib/libfoo.so already loaded in another classloader
Since I hot deploy then it tries to load the same library and off course JVM will not allow such thing.
I have read something about it online but none seems to help or hard to follow to be honest with you.
My question has been dealt with this kind of scenario depolying ws in tomcat or jboss? Is there a way I check if it is already loaded then skip it otherwise load it. Or how do people handle such an issue.
I appreciate any kind of tips.
regards,
Comment