.dll already loaded in another classloader?

前端 未结 4 808
庸人自扰
庸人自扰 2020-11-27 07:23

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

4条回答
  •  野性不改
    2020-11-27 08:03

    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:

    1. Stop your Application Server and close the IDEA
    2. Finish all java processes from task manager
    3. Go to this address of your App Server: jboss-eap-6.4.0\standalone\configuration and open standalone.xml file
    4. In the standalone.xml , delete all the deployments tag (Don't worry, when you rerun the application server, it inserts this tag
    5. Go to this address of your App Server: jboss-eap-6.4.0\standalone\deployments and delete all deployed files and war files. (You can backup your war files)
    6. Open IntelliJ Idea and go to: Edit Configuration JBOSS -> Deployment tab
    7. Delete current deployment and add a new one that should be exploded

提交回复
热议问题