David Mollitor created KAFKA-9443:
-------------------------------------

             Summary: Producer Can Fail with NPE
                 Key: KAFKA-9443
                 URL: https://issues.apache.org/jira/browse/KAFKA-9443
             Project: Kafka
          Issue Type: Improvement
            Reporter: David Mollitor


{code:none}
kafka.api.ClientIdQuotaTest > testProducerConsumerOverrideUnthrottled FAILED
    java.lang.NullPointerException
        at 
org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:1141)
        at 
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:429)
        at 
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:312)
        at 
kafka.api.IntegrationTestHarness.createProducer(IntegrationTestHarness.scala:123)
        at 
kafka.api.ClientIdQuotaTest.createQuotaTestClients(ClientIdQuotaTest.scala:37)
        at kafka.api.BaseQuotaTest.setUp(BaseQuotaTest.scala:76)
        at kafka.api.ClientIdQuotaTest.setUp(ClientIdQuotaTest.scala:33)
{code}

I believe that the issue is that there is some small amount of initialization 
that happens before the logger is configured.  If a failure occurs quickly then 
an Exception is thrown and the logger is used to report the error,.. but it's 
not yet setup so it fails with NPE.



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

Reply via email to