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

protobuf deserialize as pojo failure with quarkus #186

Open
mathianasj opened this issue Jun 7, 2022 · 2 comments · May be fixed by #336
Open

protobuf deserialize as pojo failure with quarkus #186

mathianasj opened this issue Jun 7, 2022 · 2 comments · May be fixed by #336

Comments

@mathianasj
Copy link

When you try to deserialize a protobuf message inside of kafka streams using quarkus, the quarkus class loader has layered loading which causes Class.forName to fail and be blocked. It should be using the current thread class loader.

Currently ProtobufWireFormatDecoder.java at line 72 is
final Class classType = Class.forName(className); But to make it compatible with layered class loaders it should be final Class classType = Thread.currentThread().getContextClassLoader().loadClass(className);

@mathianasj
Copy link
Author

Would you like me to submit a PR with the changes, I have confirmed the changes do work locally

@blacktooth
Copy link
Contributor

Thanks for reporting this!

It would be great if you can send a PR. If possible, please add a test as well.

danprueitt added a commit to danprueitt/aws-glue-schema-registry that referenced this issue Feb 29, 2024
…to pojo.

Use the current thread classloader rather than Class.forName when deserializing protobuf to pojo.

Closes awslabs#186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants