kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Custenborder (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-5620) SerializationException in doSend() masks class cast exception
Date Thu, 20 Jul 2017 16:44:00 GMT
Jeremy Custenborder created KAFKA-5620:
------------------------------------------

             Summary: SerializationException in doSend() masks class cast exception
                 Key: KAFKA-5620
                 URL: https://issues.apache.org/jira/browse/KAFKA-5620
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 0.11.0.0
            Reporter: Jeremy Custenborder
            Assignee: Jeremy Custenborder


I misconfigured my Serializer and passed a byte array to BytesSerializer. This caused the
following exception to be thrown. 

{code}
org.apache.kafka.common.errors.SerializationException: Can't convert value of class [B to
class org.apache.kafka.common.serialization.BytesSerializer specified in value.serializer
{code}

This doesn't provide much detail because it strips the ClassCastException. It made figuring
this out much more difficult. The real value was the inner exception which was:
{code}
[B cannot be cast to org.apache.kafka.common.utils.Bytes
{code}

We should include the ClassCastException.






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message