java.lang.ExceptionInInitializerError

kafka-users | Haoming Zhang | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at org.apache.kafka.clients.producer.KafkaProducer.<init>()
  2. Apache Kafka
    KafkaProducer.<init>
    1. org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:98)
    2. org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:94)
    2 frames
  3. Apache Kafka
    KafkaLog4jAppender.activateOptions
    1. kafka.producer.KafkaLog4jAppender.activateOptions(KafkaLog4jAppender.scala:63)
    1 frame
  4. Apache Log4j
    LogManager.<clinit>
    1. org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
    2. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
    3. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
    4. org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
    5. org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
    6. org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:568)
    7. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:442)
    8. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
    9. org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
    10. org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
    10 frames
  5. SLF4J LOG4J-12 Binding
    Log4jLoggerFactory.getLogger
    1. org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    1 frame
  6. SLF4J API Module
    LoggerFactory.getLogger
    1. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:243)
    2. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)
    2 frames
  7. Apache Kafka
    KafkaProducer.<clinit>
    1. org.apache.kafka.clients.producer.KafkaProducer.<clinit>(KafkaProducer.java:64)
    1 frame
  8. Unknown
    Test$delayedInit$body.apply
    1. Test$delayedInit$body.apply(Test.scala:47)
    1 frame
  9. Scala
    App$class.main
    1. scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    2. scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    3. scala.App$$anonfun$main$1.apply(App.scala:71)
    4. scala.App$$anonfun$main$1.apply(App.scala:71)
    5. scala.collection.immutable.List.foreach(List.scala:318)
    6. scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
    7. scala.App$class.main(App.scala:71)
    7 frames
  10. Unknown
    Test.main
    1. Test$.main(Test.scala:21)
    2. Test.main(Test.scala)
    2 frames