By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,873 Members | 1,034 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,873 IT Pros & Developers. It's quick & easy.

java.lang.UnsatisfiedLinkError: Native Library WEB-INF/lib/libfoo.so already loaded i

P: 21
Hi,

I have built a web servise using JNI under jboss. The JNI loads a native library
static {
Ststem.loadLibrary("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.UnsatisfiedLinkError: 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,
Sep 20 '07 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
Hi,

I have built a web servise using JNI under jboss. The JNI loads a native library
static {
Ststem.loadLibrary("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.UnsatisfiedLinkError: 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,
UnsatisfiedLink does not mean that the library is already loaded. It means that the library does not exist.
Sep 20 '07 #2

P: 21
UnsatisfiedLink does not mean that the library is already loaded. It means that the library does not exist.
Thanks for the reply.
No in this case. It means it was trying to reload the same library. Again this only happens if I redeploy the web services. If I restart jboss then there is no problem. And this is because this call is in the web application folder it tries to load it again.

I would like to resolve this issue without restarting the server. Any idea?
thanks
Sep 20 '07 #3

10K+
P: 13,264
Thanks for the reply.
No in this case. It means it was trying to reload the same library. Again this only happens if I redeploy the web services. If I restart jboss then there is no problem. And this is because this call is in the web application folder it tries to load it again.

I would like to resolve this issue without restarting the server. Any idea?
thanks
Read the API documentation for that method. The library is simply not being found in the path that's being used to search for it at that moment.
Sep 20 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.