-
Notifications
You must be signed in to change notification settings - Fork 37
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
java.lang.NoClassDefFoundError: ProtoSchema - v5.0.1.Final #267
Comments
can you paste the output of |
I am using gradle. It works fine with version 4, but in version 5 I cannot get past this error. |
can you get the actual |
My gradle dependencies: |
Sorry Tristin, I am using gradle build not sure which specific javac command is being executed. Trying to check |
Have also added this compiler arg from your doc: |
|
I am using JDK 17 |
Thanks for the feedback, the documentation only mentions one dependency which is the annotation processor dependency. I have tried adding the other protostream dependencies before and it didn't resolve the issue. Which other library is required for this ProtoSchema class? |
Well, I'm surprised it worked for you with 4 and not 5, because the layout of the jars has not changed |
as for the failure related to the annotation processor option, that's a bug. I'll fix it |
Yes I am not understanding what the issue is either, with 4 its working great. Was hoping to switch to 5 for the proto3 support. Thanks for all the help. Will keep track to see if that bug is fixed. |
I'll try to set up a simple gradle build to see what's happening |
Sure that sounds good, let me know if you require any info from my end |
Btw, the debug option is |
Thanks, that worked. Error is the same however:
Iv included the following dependency as well but no luck yet: |
Not sure if this is helpful but version 5.0.0.Dev01 works, although it generates a schema using proto2 syntax |
This worked for me: https://github.com/tristantarrant/protostream-gradle |
So, I downloaded your project and was able to run it, however the spring boot application I have is still throwing the same error. I have cross referenced both projects and see no real differences. Let me verify further and share what I find. Also is the syntax supposed to still be proto2? |
For backwards compatibility. Use the following: @ProtoSchema(schemaFileName = "simple.proto", includeClasses = Simple.class, syntax = ProtoSyntax.PROTO3) |
Thanks a lot for all the feedback and the example project. It is very helpful. However, with the spring boot application, it is still throwing the same error. I have uploaded the project here. Can take a look if you ever get a chance and recreate the issue: |
Hey Tristan, believe this issue is related to some type of conflict with Spring Boot/ maybe due to conflicting Jackson versions? Tried it on another application and its working as expected. Thanks again for all your prompt feedback |
I modified my project to add Is there any more information from that exception |
Using the new 5.0.1.Final dependency creates the following error:
Execution failed for task ':compileJava'.
This happens as soon as the annotation processor is added to the project. This also happens with all the other v5 versions. Any feedback on this ? Thank you
The text was updated successfully, but these errors were encountered: