SLF4J / SLF4J-500 [Open]
SLF4J LOG4J 12 Binding throws Null Pointer Exception staring with version 1.7.19

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-500

==============================
 Issue created
------------------------------

Anushree created this issue on 24/Aug/20 8:12 AM
Summary:              SLF4J LOG4J 12 Binding throws Null Pointer Exception 
staring with version 1.7.19
Issue Type:           Bug
Affects Versions:     1.7.19, 1.7.20, 1.7.30
Assignee:             SLF4J developers list
Components:           Unspecified
Created:              24/Aug/20 8:12 AM
Environment:
  I was using fluent-logger for logging and it worked well until version 1.7.18 
for slf4j-log4j12.
  
  
  This is the offending commit introduced in 1.7.19  which was done to fix a 
NullPointerException. Its force initializing rootLogger to fix a NPE in 
multithreaded scenarios looks like. The irony is this is the commit which is 
causing NullPointerException for us
  
[https://github.com/qos-ch/slf4j/commit/111b8e581e247b33bb2fe66bd0118399e0b49a90]
  
  Here is the stack trace for my error:
  
  hdiuser@hn0-d0140a:/usr/hdp/4.1-0/spark2/jars$ spark-submit --version
  
  SPARK_MAJOR_VERSION is set to 2, using Spark2
  
  Unexpected problem occured during version sanity check
  
  Reported exception:
  
  java.lang.NullPointerException
  
          at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:267)
  
          at 
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:126)
  
          at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
  
          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
  
          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
  
          at 
org.fluentd.logger.sender.RawSocketSender.<clinit>(RawSocketSender.java:34)
  
          at 
org.fluentd.logger.FluentLoggerFactory.getLogger(FluentLoggerFactory.java:72)
  
          at 
org.fluentd.logger.FluentLoggerFactory.getLogger(FluentLoggerFactory.java:51)
  
          at org.fluentd.logger.FluentLogger.getLogger(FluentLogger.java:40)
  
          at com.mdsdclient.MdsLogger.<init>(Unknown Source)
  
          at 
com.log4jappender.common.logger.HdInsightLoggerLinux.<init>(Unknown Source)
  
          at 
com.log4jappender.common.logger.HdInsightLoggerFactory.getLogger(Unknown Source)
  
          at 
com.log4jappender.common.appendercore.AnonymizeLogAppenderCommon.getLogger(Unknown
 Source)
  
          at 
com.log4jappender.common.appendercore.AnonymizeLogAppenderCommon.<init>(Unknown 
Source)
  
          at com.log4jappender.AnonymizeLogAppender.activateOptions(Unknown 
Source)
  
          at 
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
  
          at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
  
          at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
  
          at 
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
  
          at 
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
  
          at 
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
  
          at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
  
          at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
  
          at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
  
          at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
  
          at 
org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66)
  
          at 
org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
  
          at 
org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
  
          at 
org.apache.spark.internal.Logging$.org$apache$spark$internal$Logging$$isLog4j12(Logging.scala:222)
  
          at 
org.apache.spark.internal.Logging.initializeLogging(Logging.scala:127)
  
          at 
org.apache.spark.internal.Logging.initializeLogIfNecessary(Logging.scala:111)
  
          at 
org.apache.spark.internal.Logging.initializeLogIfNecessary$(Logging.scala:105)
  
          at 
org.apache.spark.deploy.SparkSubmit.initializeLogIfNecessary(SparkSubmit.scala:75)
  
          at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:83)
  
          at 
org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
  
          at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
  
          at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  
  Exception in thread "main" java.lang.ExceptionInInitializerError
  
          at 
org.fluentd.logger.FluentLoggerFactory.getLogger(FluentLoggerFactory.java:72)
  
          at 
org.fluentd.logger.FluentLoggerFactory.getLogger(FluentLoggerFactory.java:51)
  
          at org.fluentd.logger.FluentLogger.getLogger(FluentLogger.java:40)
  
          at com.mdsdclient.MdsLogger.<init>(Unknown Source)
  
          at 
com.log4jappender.common.logger.HdInsightLoggerLinux.<init>(Unknown Source)
  
          at 
com.log4jappender.common.logger.HdInsightLoggerFactory.getLogger(Unknown Source)
  
          at 
com.log4jappender.common.appendercore.AnonymizeLogAppenderCommon.getLogger(Unknown
 Source)
  
          at 
com.log4jappender.common.appendercore.AnonymizeLogAppenderCommon.<init>(Unknown 
Source)
  
          at com.log4jappender.AnonymizeLogAppender.activateOptions(Unknown 
Source)
  
          at 
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
  
          at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
  
          at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
  
          at 
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
  
          at 
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
  
          at 
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
  
          at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
  
          at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
  
          at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
  
          at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
  
          at 
org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66)
  
          at 
org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
  
          at 
org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
  
          at 
org.apache.spark.internal.Logging$.org$apache$spark$internal$Logging$$isLog4j12(Logging.scala:222)
  
          at 
org.apache.spark.internal.Logging.initializeLogging(Logging.scala:127)
  
          at 
org.apache.spark.internal.Logging.initializeLogIfNecessary(Logging.scala:111)
  
          at 
org.apache.spark.internal.Logging.initializeLogIfNecessary$(Logging.scala:105)
  
          at 
org.apache.spark.deploy.SparkSubmit.initializeLogIfNecessary(SparkSubmit.scala:75)
  
          at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:83)
  
          at 
org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
  
          at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
  
          at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Priority:             Major
Reporter:             Anushree


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)

_______________________________________________
slf4j-dev mailing list
slf4j-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to