Java error Native Library already loaded in another classloader

孤街醉人 提交于 2019-12-06 01:53:32

you do undeploy before you redeploy it. you no need to delete the dll file,it is not at all related to your error.it is an error of java and jboss.the problem is when you are redeploying it,it is unable to unload the libraries which you have loaded at the time of initial deployment.so better you check whether the library is loaded or not before you load the library next time,if it is already loaded do not load the library.

If you're using JBoss 7, try moving the jar file that uses the dll into a JBoss module. Restart JBoss so that it picks up the module. Modify your MANIFEST.MF file so that it contains "Dependencies: theNameYouGaveIt".

Where "theNameYouGaveIt" is the name you chose in your module's "yourModule/main/module.xml" file.

That way, JBoss doesn't reload the library over and over again. Then undeploy/redeploy your .ear or .war over and over again.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!