You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Colin B. (JIRA)" <ji...@apache.org> on 2013/06/03 20:01:31 UTC
[jira] [Closed] (KAFKA-897) NullPointerException in ConsoleConsumer
[ https://issues.apache.org/jira/browse/KAFKA-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colin B. closed KAFKA-897.
--------------------------
> NullPointerException in ConsoleConsumer
> ---------------------------------------
>
> Key: KAFKA-897
> URL: https://issues.apache.org/jira/browse/KAFKA-897
> Project: Kafka
> Issue Type: Bug
> Components: consumer
> Affects Versions: 0.8
> Reporter: Colin B.
> Assignee: Neha Narkhede
> Priority: Minor
> Fix For: 0.8.1
>
> Attachments: Kafka897-v1.patch, KAFKA-897-v2.patch
>
>
> The protocol document [1] mentions that keys and values in message sets can be null. However the ConsoleConsumer throws a NPE when a null is passed for the value.
> java.lang.NullPointerException
> at kafka.utils.Utils$.readBytes(Utils.scala:141)
> at kafka.consumer.ConsumerIterator.makeNext(ConsumerIterator.scala:106)
> at kafka.consumer.ConsumerIterator.makeNext(ConsumerIterator.scala:33)
> at kafka.utils.IteratorTemplate.maybeComputeNext(IteratorTemplate.scala:61)
> at kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:53)
> at scala.collection.Iterator$class.foreach(Iterator.scala:631)
> at kafka.utils.IteratorTemplate.foreach(IteratorTemplate.scala:32)
> at scala.collection.IterableLike$class.foreach(IterableLike.scala:79)
> at kafka.consumer.KafkaStream.foreach(KafkaStream.scala:25)
> at kafka.consumer.ConsoleConsumer$.main(ConsoleConsumer.scala:195)
> at kafka.consumer.ConsoleConsumer.main(ConsoleConsumer.scala)
> [1] https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-Messagesets
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira