jacob.dll already loadedin another classloader

萝らか妹 提交于 2021-02-07 22:36:15

问题


I am implmented a webservice in java and webservice client also in java. both the webservice ane webservice client are in different project and i am created dll using jacob.

My Webservice and webservice client is on same computer.now whenever i am calling the webservice using webservice client than encounter following exception.

exception

org.apache.jasper.JasperException: javax.xml.ws.soap.SOAPFaultException: Native Library C:\Program Files (x86)\Java\jdk1.6.0_24\bin\jacob.dll already loaded in another classloader root cause

javax.xml.ws.soap.SOAPFaultException: Native Library C:\Program Files (x86)\Java\jdk1.6.0_24\bin\jacob.dll already loaded in another classloader root cause

java.lang.UnsatisfiedLinkError: Native Library C:\Program Files (x86)\Java\jdk1.6.0_24\bin\jacob.dll already loaded in another classloader


回答1:


jacob.dll can only be loaded once for each instance of a JVM. If the library jacob.jar is loaded more than once, it will try to load jacob.dll more than once, too.

To avoid that, remove the jacob.jar from both webservices and put it in some place where it can be found by a classloader that both webservices share, that way jacob.jar will be loaded only once. For example, if you are using tomcat, put the jacob.jar in the /lib directory of that tomcat.



来源:https://stackoverflow.com/questions/9328520/jacob-dll-already-loadedin-another-classloader

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