-1
我有一個mvn火花項目與以下依賴性罐子(只顯示相關的罐子)。log4j與sl4j mvn依賴關係錯誤
mvn dependency:tree |grep slf4j
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.7.2:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.2:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.2:runtime
[INFO] \- org.slf4j:jul-to-slf4j:jar:1.7.2:runtime
,當我使用此代碼
SparkSession spark = SparkSession
.builder()
.appName("Test spark model file")
.master("local")
.getOrCreate();
運行此MVN項目中,我得到以下錯誤
Exception in thread "main" java.lang.StackOverflowError
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.slf4j.impl.JDK14LoggerFactory.getLogger(JDK14LoggerFactory.java:59)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:204)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:289)
at java.util.logging.Logger.log(Logger.java:738)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:579)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:651)
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:299)
at java.util.logging.Logger.log(Logger.java:738)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:579)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:651)...
我看到這個Using log4j2 with slf4j 涉及到我的錯誤,但似乎沒有幫助
你能提供你的pom的內容嗎?另外,您採取了哪些與其他帖子相關的操作?這兩個錯誤似乎確實相關。 –