Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException when running SimpleJsonSchemaExample in v3.0.6 #5969

Open
robwtelicent opened this issue Feb 11, 2025 · 1 comment
Open

Comments

@robwtelicent
Copy link

I have checked out apicurio-registry at tag v.3.0.6 and followed the instructions in the README to start the registry and UI. I have then compiled and run the SimpleJsonSchemaExample in the examples folder and got the following error:

Starting example SimpleJsonSchemaExample
Feb 11, 2025 8:09:56 PM io.netty.resolver.dns.DnsServerAddressStreamProviders <clinit>
WARNING: Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'
Producing (5) messages.
Messages successfully produced.
Closing the producer.
Creating the consumer.
Subscribing to topic SimpleJsonSchemaExample
Consuming (5) messages.
No messages waiting...
No messages waiting...
No messages waiting...
Exception in thread "main" java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class io.apicurio.registry.examples.simple.json.MessageBean (com.fasterxml.jackson.databind.node.ObjectNode and io.apicurio.registry.examples.simple.json.MessageBean are in unnamed module of loader 'app')
	at io.apicurio.registry.examples.simple.json.SimpleJsonSchemaExample.lambda$main$1(SimpleJsonSchemaExample.java:160)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at io.apicurio.registry.examples.simple.json.SimpleJsonSchemaExample.main(SimpleJsonSchemaExample.java:159)

Previously I checked out the main branch and had the same issue so I thought maybe going back to the latest release it would be OK. I note the MacOS DNS error but adding the dependency makes no difference to this issue.

@apicurio-bot
Copy link

apicurio-bot bot commented Feb 11, 2025

Thank you for reporting an issue!

Pinging @andreaTP to respond or triage.

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

No branches or pull requests

1 participant