1

I have a problem using waffle and tomcat 7 to enable login via windows authentication.

Everything is working fine but everytime I deploy the application, I get this error:

java.lang.UnsatisfiedLinkError: Native Library C:\Program Files    (x86)\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\seedInventory\loader\com\sun\jna\win32-x86\jnidispatch.dll already loaded in another classloader

When I restart tomcat, it started working again. However, I want to be able to deploy the application without restarting.

I see that this file jnidispatch.dll is still being used even after the undeploy and I can't delete it manually.

What could I do?

henriquels
  • 518
  • 4
  • 20

1 Answers1

1

Take a look at Apache Tomcat HowTo section about classloader problems when using JNI under Tomcat. It says, that:

The important thing to know about using JNI under Tomcat is that one cannot place the native libraries OR their JNI interfaces under the WEB-INF/lib or WEB-INF/classes directories of a web application and expect to be able to reload the webapp without restarting the server.

So, it seems, that some of your libraries contains a native jnidispatch.dll lib, which you should move out of jar or war into Tomcat's lib folder, to make it possible to redeploy you application.

Stanislav
  • 27,441
  • 9
  • 87
  • 82
  • Thanks, I moved the dll to the tomcat lib folder and removed the jna.jar dependency from my project. This way, I can deploy the apllication without restarting the server. – henriquels Oct 21 '15 at 12:38