Hello Walter, Which version of Kafka were you using?
I ask this because there was a bug causing the serde passed through config to NOT being configured when constructed: https://issues.apache.org/jira/browse/KAFKA-3639 Which is fixed in the 0.10.0.0 release, which means you will only hit it if you are using the tech-preview release version. Guozhang On Wed, Sep 14, 2016 at 11:10 AM, Walter rakoff <walter.rak...@gmail.com> wrote: > Hello, > > I get the below exception when deserilaizing avro records > using KafkaAvroDeserializer. > > 16/09/14 17:24:39 INFO StreamThread: Stream thread shutdown complete > [StreamThread-1] > Exception in thread "StreamThread-1" > org.apache.kafka.common.errors.SerializationException: > Error deserializing Avro message for id 4 > Caused by: java.lang.NullPointerException > at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer. > deserialize(AbstractKafkaAvroDeserializer.java:120) > at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer. > deserialize(AbstractKafkaAvroDeserializer.java:92) > > I can confirm that schema registry URL is accessible and url/schemas/ids/4 > does return valid schema. > May be some initialization didn't happen correctly? > > props.put(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, " > 192.168.50.6:8081") > props.put(StreamsConfig.KEY_SERDE_CLASS_CONFIG, > Serdes.Long.getClass.getName) > props.put(StreamsConfig.VALUE_SERDE_CLASS_CONFIG, classOf[ > GenericAvroSerdeWithSchemaRegistry]) > > GenericAvroSerdeWithSchemaRegistry code --> https://www.dropbox.com/s/ > y471k9nj94tlxro/avro_serde.txt?dl=0 > > Walter > -- -- Guozhang