While using the given AvroSerializer and Deserializer in Serde with Kafka streams , I am facing ClassCastException
GenericData$Record cannot be cast to org.apache.avro.specific.SpecificRecordBase.
config.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.serdeFrom(new AvroSerializer()
, new AvroDeserializer(MemberMeasureKey.class)).getClass());
config.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.serdeFrom(new AvroSerializer()
, new AvroDeserializer(MemberMeasureValue.class)).getClass());
While using the given AvroSerializer and Deserializer in Serde with Kafka streams , I am facing ClassCastException GenericData$Record cannot be cast to org.apache.avro.specific.SpecificRecordBase.
config.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.serdeFrom(new AvroSerializer()
, new AvroDeserializer(MemberMeasureKey.class)).getClass());
config.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.serdeFrom(new AvroSerializer()
, new AvroDeserializer(MemberMeasureValue.class)).getClass());
Please help me on this.