我們有兩個單獨的相同Web應用程序實例。一個是沙箱,另一個是現場環境。兩者都訪問顛覆,因此我們設置svnClientAdapter
來使用JavaHL。在應用程序的啓動,我們呼籲JhlClientAdapterFactory.setup();
兩個單獨的JBoss Web應用程序上的JavaHL LinkageError:已由另一個類加載器加載
當第二個實例啓動時,我得到錯誤信息:
Failed to load JavaHL Library.
These are the errors that were encountered:
Native Library C:\jboss-6.1.0.Final\bin\native\msvcr100.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\msvcp100.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libapr-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libapriconv-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libeay32.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\ssleay32.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libaprutil-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\dbghelp.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsasl.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_subr-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_delta-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_diff-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_wc-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_fs-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_repos-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_ra-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvn_client-1.dll already loaded in another classloader
Native Library C:\jboss-6.1.0.Final\bin\native\libsvnjavahl-1.dll already loaded in another classloader
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = C:/jboss-6.1.0.Final/bin/native
這是很明顯的問題是什麼,但我不知道如何解決它。
System.loadLibrary(WINDOWSLIBS[i]);
我想這會工作,但我們無法控制哪個服務器上運行哪個實例,這意味着我無法確定每個實例是否正在運行「本機庫」 - 實例。但我用不同的方式解決了它。謝謝 –