我是在對一個專案做二次開發,tomcat8+solr4
運行時報錯如下:
嚴重: Exception starting filter SolrRequestFilter
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of java/net/URLClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
網上搜了,主要解決方法有兩個:
1.Maven配置中的pom.xml檔案添加provided
2.Maven找dependency的檔案然后刪掉重復的
但是我這個專案沒有部署在Maven上呀,也不太了解...
請問有別的解決方法嗎?比如能寫個什么檔案,達到相同的效果?或者我要如何知道什么檔案沖突了?
十分感謝!
uj5u.com熱心網友回復:
從你貼的報錯資訊上看:have different Class objects for the type org/slf4j/ILoggerFactory used in the signature是不是二個包中加載的slf4j的版本沖突導致的?能不能把報錯的背景關系的完整日志發出來看看。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/141035.html
標籤:Java相關
上一篇:java錯誤: 找不到符號
