cxf 發佈webservice報 You have more than one version of 'org.apache.commons.logging.Log' visible

 項目中採用cxf發佈webservice,在同一osgi環境下寫測試類發現能夠正常運行,但經過發佈成webservice後,用工程調用報如下異常:

 org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException:  

 org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one

 version of 'org.apache.commons.logging.Log' visible, which is not allowed.

 

 根據報出的異常可以看出是日誌包的衝突,最後查出是在客戶端調用的項目中也引入了apache的commons-logging包或者是與commons-logging相關的日誌包:slf4j,log4j等

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章