I have a webapp running under Tomcat 3.2.1 that needs to make JNI calls in order to access data and methods in legacy C++ code. A servlet is loaded on startup of the webapp
I had this problem and I solved it:
Problem:
The problem is due to some configurations of your application server which cause to create more than one war or ear files and consequently it creates more than one deployed files. These deployed files attempt to have a concurrent access to your native library which loaded in a static block.
Solution:
java processes from task managerjboss-eap-6.4.0\standalone\configuration and open standalone.xml filestandalone.xml , delete all the deployments tag (Don't worry, when you rerun the application server, it inserts this tagjboss-eap-6.4.0\standalone\deployments and delete all deployed
files and war files. (You can backup your war files)exploded