registry icon indicating copy to clipboard operation
registry copied to clipboard

Settings "avro.specific.reader" via Spring results in a class cast exception

Open gonozalviii opened this issue 6 years ago • 3 comments

AbstractAvroSnapshotDeserializer assumes type boolean for the property entry in its config map. It uses the following line in its doInit()-Method

useSpecificAvroReader = (boolean) getValue(config, SPECIFIC_AVRO_READER, false);

Settings this property using Spring results in its type being a String. Changing that to:

useSpecificAvroReader = Boolean.valueOf(getValue(config, SPECIFIC_AVRO_READER, false));

would fix the issue.

gonozalviii avatar Jan 09 '20 15:01 gonozalviii

@gonozalviii: Can you raise a PR for this?

raju-saravanan avatar Feb 11 '20 06:02 raju-saravanan

I'm facing the same issue, using com.hortonworks.registries.schemaregistry.serdes.avro.kafka.KafkaAvroDeserializer with Spring Boot.

As mentioned by @gonozalviii , would it be possible to get the given fix for this ?

jay-blanc avatar Jun 03 '20 22:06 jay-blanc

@raju-saravanan PR: https://github.com/hortonworks/registry/pull/730

piecho1991 avatar Jul 24 '20 10:07 piecho1991

Fixed.

gcsaba2 avatar Oct 05 '22 12:10 gcsaba2