You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ian Springer (Jira)" <ji...@apache.org> on 2021/07/27 16:52:00 UTC

[jira] [Created] (SPARK-36316) NoClassDefFoundError for org.slf4j.impl.StaticLoggerBinder in org.apache.spark.Logging#isLog4j12 when using SLF4J/Logback 2.x

Ian Springer created SPARK-36316:
------------------------------------

             Summary: NoClassDefFoundError for org.slf4j.impl.StaticLoggerBinder in org.apache.spark.Logging#isLog4j12 when using SLF4J/Logback 2.x
                 Key: SPARK-36316
                 URL: https://issues.apache.org/jira/browse/SPARK-36316
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 3.1.2
            Reporter: Ian Springer


When using SLF4J 2.x, I hit the following exception:

 
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
 

This is because org.slf4j.impl.StaticLoggerBinder no longer exists in SLF4J 2.x (see [http://www.slf4j.org/codes.html#StaticLoggerBinder).] Ideally, Spark should not have a hard dependency on an SFL4J 1.x impl classes. 

 

Perhaps reflection or NoClassDefFoundError try-catch blocks could be used in the logger detection code, so both SLF4J 1.x and 2.x could be supported at runtime.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org