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/05/08 02:29:16 UTC
[jira] [Created] (KAFKA-897) NullPointerException in
ConsoleConsumer
Colin B. created KAFKA-897:
------------------------------
Summary: 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
The [protocol document|https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-Messagesets] 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.
{quote}
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)
{quote}
--
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