Skip to content

Getting ClassCast Exception : GenericData$Record cannot be cast to org.apache.avro.specific.SpecificRecordBase #5

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions