I faced with the problem:
Native Library Ltkrnx.dll already loaded in another classloader
during redeploy application(tomcat 8 server).
I also added check, but it's doesn't help me.
private void loadLibrary(LTLibrary library) {
if (!Platform.isLibraryLoaded(library)) {
Platform.loadLibrary(library);
}
}
Caused by: leadtools.RasterException: Native Library C:\LEADTOOLS 20\Bin\CDLL\x64\Ltkrnx.dll already loaded in another classloader
Are you using LEADTOOLS in 2 different web applications? If yes, the following answer might help you solve the problem: java.lang.UnsatisfiedLinkError: Native Library XXX.so already loaded in another classloader
Since that question is about OpenCV, not LEADTOOLS, I will quote the relevant parts here (very slightly edited):
Now there's the restriction that a native library can only be loaded in one class loader. Web applications use their own class loader so if one web application has loaded a native library, another web application cannot do the same. Therefore code loading native libraries cannot be put in a webapp directory but must be put in the container's (Tomcat) shared directory. When you have a class written with the usual pattern above (loadLibrary in static initializer of using class) it's enough to put the jar containing the class in the shared directory. With .. the loadLibrary call in the web application code however, the native library will still be loaded in the "wrong" class loader and you will get the UnsatisfiedLinkError.
To make the "right" class loader load the native library you could create a tiny class with a single static method doing only the loadLibrary. Put this class in an extra jar and put this jar in the shared Tomcat directory. Then in the web applications replace the call to System.loadLibrary with a call to your new static method. This way the class loaders for the .. native library will match and the native methods can be initialized.
If your situation is different, or the suggestion there doesn’t help you, send the following information to [email protected] and our support team will work with you to isolate the problem: