unsubscribe

2016-11-14 20:01 GMT+08:00 Andrew Xor <andreas.gramme...@gmail.com>:

> Hi,
>
>  Since you can't cast one type to  another and you are not getting a Null
> exception in order to be better able to help you could you give us the
> implementation of your serializer?
>
> Cheers,
>
> A.
>
> On Mon, Nov 14, 2016 at 9:17 AM, Zhechao Ma <mazhechaomaill...@gmail.com>
> wrote:
>
>> Even when I implement my own json serializer, it still throws the similar
>> exception, but no more details for debug.:
>>
>> org.apache.kafka.common.errors.SerializationException: Can't convert
>> value of class org.apache.storm.shade.org.json.simple.JSONObject to
>> xxxxxx specified in value.serializer
>>
>> I add a LOG in the overriding method byte[] serialize(String topic,
>> JSONObject data), and found no logs in worker.log. That is to say this
>> exception is throwed before method serialize is called.
>>
>> 2016-11-07 16:50 GMT+08:00 Zhechao Ma <mazhechaomaill...@gmail.com>:
>>
>>> I'm using KafkaBolt to write data to kafka. Tuple to kafka map is
>>> <String, JSONObject>.
>>> I set both *key.serializer* and *value.serializer* as
>>> "org.apache.kafka.common.serialization.StringSerializer". I get the
>>> following Exception:
>>>
>>> org.apache.kafka.common.errors.SerializationException: Can't convert
>>> value of class org.apache.storm.shade.org.json.simple.JSONObject to
>>> class org.apache.kafka.common.serialization.StringSerializer specified
>>> in value.serializer
>>>
>>>
>>> I cannot find other serializers related to JSON, and I'm using storm
>>> 1.0.2 and kafka 0.8.1.1.
>>>
>>> Could anyone help ?
>>>
>>> --
>>> Thanks
>>> Zhechao Ma
>>>
>>
>>
>>
>> --
>> Thanks
>> Zhechao Ma
>>
>
>

Reply via email to