confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
90 stars 869 forks source link

JsonSerializer- Local: Value serialization error : Unrecognized field: references; error code: 422 #1242

Closed MohamedRDwedar closed 4 years ago

MohamedRDwedar commented 4 years ago

I follow the example of JsonDeserializer
and i always got this error message

Local: Value serialization error : Unrecognized field: references; error code: 422 i am using the these nuget versions

Confluent.Kafka : 1.4.0 Confluent.SchemaRegistry: 1.4.0 Confluent.SchemaRegistry.Serdes : 1.3.0 Confluent.SchemaRegistry.Serdes.Json: 1.4.0

what i am missing here ?

mijgame commented 4 years ago

I also have this issue with the Protobuf serializer.

mhowlett commented 4 years ago

please provide more information. does the example application work for you? https://github.com/confluentinc/confluent-kafka-dotnet/tree/master/examples/JsonSerialization

edenhill commented 4 years ago

JSON and Protobuf is only supported in the not yet released version of Confluent Schema Registry. You will need to build it manually from source until it has been formally released.

mhowlett commented 4 years ago

thanks @edenhill , i have no idea how that slipped my mind.

MohamedRDwedar commented 4 years ago

@mhowlett no it doesn't work for me i have downloaded the example you have mentioned and i got this error Local: Value serialization error : Unrecognized field: references; error code: 422 .

also try the same steps in my application and got the same error .

MohamedRDwedar commented 4 years ago

@edenhill this nuget package has been realsed 5 days ago Confluent.SchemaRegistry.Serdes.Json -Version 1.4.0 or you mean another another one ?

mhowlett commented 4 years ago

The first version of Schema Registry to support JSON Schema is v5.5.0, however that hasn't been released yet. To use the JSON or Protobuf serdes you need that. To get started now, you'll need to download from https://github.com/confluentinc/schema-registry and compile yourself (master or 5.5.x branch)

MohamedRDwedar commented 4 years ago

thanks @mhowlett is there any time frame when the official docker images will be released .

mhowlett commented 4 years ago

i don't know when exactly, but it shouldn't be too far off.

MohamedRDwedar commented 4 years ago

thanks @mhowlett i hope in will very soon as i am starting new project based of kafka

mhowlett commented 4 years ago

Confluent Platform v5.5 is now out.

Alpesh1984909090 commented 1 year ago

I'm also getting the same error. i'm using Avro format and trying to push the message using confluent kafka libraries for C#

Local: Value serialization error ---> Confluent.SchemaRegistry.SchemaRegistryException: ; error code: -1 at Confluent.SchemaRegistry.RestService.ExecuteOnOneInstanceAsync(Func1 createRequest) at Confluent.SchemaRegistry.RestService.RequestAsync[T](String endPoint, HttpMethod method, Object[] jsonBody) at Confluent.SchemaRegistry.RestService.GetLatestSchemaAsync(String subject) at Confluent.SchemaRegistry.CachedSchemaRegistryClient.GetLatestSchemaAsync(String subject) at Confluent.SchemaRegistry.Serdes.SpecificSerializerImpl1.Serialize(String topic, T data, Boolean isKey) at Confluent.SchemaRegistry.Serdes.AvroSerializer1.SerializeAsync(T value, SerializationContext context) at Confluent.Kafka.Producer2.ProduceAsync(TopicPartition topicPartition, Message2 message, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Confluent.Kafka.Producer2.ProduceAsync(TopicPartition topicPartition, Message`2 message, CancellationToken cancellationToken)