[ https://issues.apache.org/jira/browse/KAFKA-2793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999498#comment-14999498 ]
ASF GitHub Bot commented on KAFKA-2793: --------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/kafka/pull/482 > ConsoleConsumer crashes with new consumer when using keys because of > incorrect deserializer > ------------------------------------------------------------------------------------------- > > Key: KAFKA-2793 > URL: https://issues.apache.org/jira/browse/KAFKA-2793 > Project: Kafka > Issue Type: Bug > Components: tools > Reporter: Ewen Cheslack-Postava > Assignee: Ewen Cheslack-Postava > > The ConsoleConsumer class uses Array[Byte] everywhere, but the new consumer > is configured with a string key deserializer, resulting in a class cast > exception: > {quote} > java.lang.ClassCastException: java.lang.String cannot be cast to [B > at kafka.consumer.NewShinyConsumer.receive(BaseConsumer.scala:62) > at kafka.tools.ConsoleConsumer$.process(ConsoleConsumer.scala:101) > at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:64) > at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:42) > at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala) > {quote} > Note that this is an issue whether you are printing the keys or not, it will > be triggered by any non-null key (and I'd imagine some should also trigger > serialization exceptions if they are not UTF8-decodeable). -- This message was sent by Atlassian JIRA (v6.3.4#6332)