[
https://issues.apache.org/jira/browse/KAFKA-14298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617967#comment-17617967
]
Greg Harris commented on KAFKA-14298:
-------------------------------------
[~ramkychowdary0560] I'm not familiar with `com.wellsfargo.dci.*`, I assume
that is an application that you're working with that makes use of the Kafka
Producer.
Taking a quick look at the implementation of doSend, it appears that it
[implicitly requires the record being sent to be
non-null|https://github.com/apache/kafka/blob/78b4ba7d85a6739ff308ef8d7af678c63ac06ef6/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L993-L995].
You may be passing in a null record, which is not being handled with a more
descriptive error message.
In order to avoid this error, it may be necessary to add a null check of your
own before calling send().
Also, as an aside, you may consider enabling more detailed NPE messages to aid
with your debugging: _-XX:+ShowCodeDetailsInExceptionMessages_
> Getting null pointer exception
> ------------------------------
>
> Key: KAFKA-14298
> URL: https://issues.apache.org/jira/browse/KAFKA-14298
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Reporter: Ramakrishna
> Priority: Major
>
> Getting null pointer exception.
>
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:995)
>
> at
> org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:925)
> at
> org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:801)
> at
> com.wellsfargo.dci.opensource.kafka.KafkaUtil$$anonfun$10$$anonfun$11.apply(KafkaUtil.scala:363)
>
> at
> com.wellsfargo.dci.opensource.kafka.KafkaUtil$$anonfun$10$$anonfun$11.apply(KafkaUtil.scala:361){noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)