question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avro.AvroException: Unable to find type 'example.test.value' when Namespace isn't 'example.test.value'

See original GitHub issue

Description

Confluent.Kafka nuget version = 1.7.0 and 1.8.2 Confluent.SchemaRegistry Version=1.7.0 1.8.2 Confluent.SchemaRegistry.Serdes.Avro Version= 1.7.0 and 1.8.2 Apache Kafka version = 2.8.0 No Critical issue

ERROR xxxx - Kafka1 | Error while consuming from topics Confluent.Kafka.ConsumeException: Local: Value deserialization error —> Avro.AvroException: Unable to find type ‘example.test.value’ in all loaded assemblies at Avro.Specific.ObjectCreator.<>c__DisplayClass14_0.<FindType>b__0(String _) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Avro.Specific.ObjectCreator.GetType(String name, Type schemaType) at Avro.Specific.SpecificDefaultReader.ReadRecord(Object reuse, RecordSchema writerSchema, Schema readerSchema, Decoder dec) at Avro.Generic.DefaultReader.Read[T](T reuse, Decoder decoder) at Confluent.SchemaRegistry.Serdes.SpecificDeserializerImpl1.Deserialize(String topic, Byte[] array) at Confluent.SchemaRegistry.Serdes.AvroDeserializer1.DeserializeAsync(ReadOnlyMemory1 data, Boolean isNull, SerializationContext context) at Confluent.Kafka.SyncOverAsync.SyncOverAsyncDeserializer1.Deserialize(ReadOnlySpan1 data, Boolean isNull, SerializationContext context) at Confluent.Kafka.Consumer2.Consume(Int32 millisecondsTimeout) — End of inner exception stack trace — at Confluent.Kafka.Consumer2.Consume(Int32 millisecondsTimeout) at Confluent.Kafka.Consumer2.Consume(TimeSpan timeout)

This Error comes when consuming Avro Data from a Topic.

This error only comes when the C# namespace in that is the Avro Class isn’t “example.test.value”

When changing the namespace of the class to example.test.value the error is fixed.

I want that i can use the example.test.value Schema in a Namespace that isn’t example.test.value.

Is that possible?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mhowlettcommented, Mar 16, 2022

i think this is an issue with the avro library

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# confluent kafka problem with avro serialization
I'm using docker to run kafka and other services from https://github.com/confluentinc/cp-all-in-one with confluent nuget packages for kafka, ...
Read more >
org.apache.avro.AvroRuntimeException java code examples
Type.RECORD.equals(schema.getType())) throw new AvroRuntimeException("Not a record schema: "+schema); this.schema = schema; this.values = new Object[schema.
Read more >
[jira] [Created] (AVRO-2888) Csharp - Specific reader fails ...
AvroException : Unable to find type 'com.parent. ... Deserialization fails as c# reflection does not expects At(@) in string value provided ...
Read more >
Avro Schema Serializer and Deserializer
In the following example, a message is sent with a key of type string and a value of type Avro record to Kafka....
Read more >
Kafka Source Connector - `output.schema.value` not ...
Hi all, We're using the source connector with Avro as schema format, it seems that the output.schema.value does not register the namespace ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found