spring-cloud / spring-cloud-stream-samples

Samples for Spring Cloud Stream
Apache License 2.0
959 stars 677 forks source link

Error: java.lang.ClassCastException: com.example.avro.AvroClearingScenarioCopy cannot be cast to com.example.avro.AvroClearingScenarioCopy #170

Closed ylcolala closed 4 years ago

ylcolala commented 4 years ago

Context: Spring Cloud Stream + Kafka streams +confluent schema registry 5.2.2 + Spring cloud dependency version Hoxton.RELEASE

My configuration:

image

Error details: image

Actually, I followed the spring cloud stream kafka stream example. There is still an error. How can I fix it? Thank you very much.

ylcolala commented 4 years ago

By the way, if I use input->input.print(printed.tosysout()), it can show the avro data. however, any other operations like mapValues throw this exception. And I code kafka stream without spring cloud stream to pull the topic, it works.

sobychacko commented 4 years ago

@ylcolala Can you provide a small sample where we can run and reproduce the issue?

ylcolala commented 4 years ago

I recode the project without my old project code. And it works. So I guess it's a version confliction. And I will migrate my old project code to new project which it works, step by step. Thank you for you help anyway. Now I close the issue.