Comments (23)
can you paste the output of mvn dependency:tree
here ?
from protostream.
I am using gradle. It works fine with version 4, but in version 5 I cannot get past this error.
from protostream.
can you get the actual javac
command being executed ?
from protostream.
My gradle dependencies:
+--- org.infinispan.protostream:protostream-processor:5.0.3.Final
| +--- org.jboss.logging:jboss-logging:3.5.3.Final
| --- org.infinispan.protostream:protostream:5.0.3.Final
| +--- org.jboss.logging:jboss-logging:3.5.3.Final
| --- com.fasterxml.jackson.core:jackson-core:2.16.2 -> 2.15.4
| --- com.fasterxml.jackson:jackson-bom:2.15.4
| +--- com.fasterxml.jackson.core:jackson-annotations:2.15.4 (c)
| +--- com.fasterxml.jackson.core:jackson-core:2.15.4 (c)
| +--- com.fasterxml.jackson.core:jackson-databind:2.15.4 (c)
| +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.4 (c)
| +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.4 (c)
| --- com.fasterxml.jackson.module:jackson-module-parameter-names:2.15.4 (c)
+--- org.projectlombok:lombok -> 1.18.30
+--- org.springframework.boot:spring-boot-starter-web -> 3.2.4
| +--- org.springframework.boot:spring-boot-starter:3.2.4
| | +--- org.springframework.boot:spring-boot:3.2.4
| | | +--- org.springframework:spring-core:6.1.5
| | | | --- org.springframework:spring-jcl:6.1.5
| | | --- org.springframework:spring-context:6.1.5
| | | +--- org.springframework:spring-aop:6.1.5
| | | | +--- org.springframework:spring-beans:6.1.5
| | | | | --- org.springframework:spring-core:6.1.5 ()
| | | | --- org.springframework:spring-core:6.1.5 ()
| | | +--- org.springframework:spring-beans:6.1.5 ()
| | | +--- org.springframework:spring-core:6.1.5 ()
| | | +--- org.springframework:spring-expression:6.1.5
| | | | --- org.springframework:spring-core:6.1.5 ()
| | | --- io.micrometer:micrometer-observation:1.12.4
| | | --- io.micrometer:micrometer-commons:1.12.4
| | +--- org.springframework.boot:spring-boot-autoconfigure:3.2.4
| | | --- org.springframework.boot:spring-boot:3.2.4 ()
| | +--- jakarta.annotation:jakarta.annotation-api:2.1.1
| | +--- org.springframework:spring-core:6.1.5 ()
| | --- org.yaml:snakeyaml:2.2
| +--- org.springframework.boot:spring-boot-starter-json:3.2.4
| | +--- org.springframework.boot:spring-boot-starter:3.2.4 ()
| | +--- org.springframework:spring-web:6.1.5
| | | +--- org.springframework:spring-beans:6.1.5 ()
| | | +--- org.springframework:spring-core:6.1.5 ()
| | | --- io.micrometer:micrometer-observation:1.12.4 ()
| | +--- com.fasterxml.jackson.core:jackson-databind:2.15.4
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.15.4
| | | | --- com.fasterxml.jackson:jackson-bom:2.15.4 ()
| | | +--- com.fasterxml.jackson.core:jackson-core:2.15.4 ()
| | | --- com.fasterxml.jackson:jackson-bom:2.15.4 ()
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.4
| | | +--- com.fasterxml.jackson.core:jackson-core:2.15.4 ()
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.15.4 ()
| | | --- com.fasterxml.jackson:jackson-bom:2.15.4 ()
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.4
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.15.4 ()
| | | +--- com.fasterxml.jackson.core:jackson-core:2.15.4 ()
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.15.4 ()
| | | --- com.fasterxml.jackson:jackson-bom:2.15.4 ()
| | --- com.fasterxml.jackson.module:jackson-module-parameter-names:2.15.4
| | +--- com.fasterxml.jackson.core:jackson-core:2.15.4 ()
| | +--- com.fasterxml.jackson.core:jackson-databind:2.15.4 ()
| | --- com.fasterxml.jackson:jackson-bom:2.15.4 ()
| +--- org.springframework.boot:spring-boot-starter-tomcat:3.2.4
| | +--- jakarta.annotation:jakarta.annotation-api:2.1.1
| | +--- org.apache.tomcat.embed:tomcat-embed-core:10.1.19
| | +--- org.apache.tomcat.embed:tomcat-embed-el:10.1.19
| | --- org.apache.tomcat.embed:tomcat-embed-websocket:10.1.19
| | --- org.apache.tomcat.embed:tomcat-embed-core:10.1.19
| +--- org.springframework:spring-web:6.1.5 ()
| --- org.springframework:spring-webmvc:6.1.5
| +--- org.springframework:spring-aop:6.1.5 ()
| +--- org.springframework:spring-beans:6.1.5 ()
| +--- org.springframework:spring-context:6.1.5 ()
| +--- org.springframework:spring-core:6.1.5 ()
| +--- org.springframework:spring-expression:6.1.5 ()
| --- org.springframework:spring-web:6.1.5 ()
+--- org.springframework.boot:spring-boot-starter-log4j2 -> 3.2.4
| +--- org.apache.logging.log4j:log4j-slf4j2-impl:2.21.1
| | +--- org.apache.logging.log4j:log4j-api:2.21.1
| | --- org.slf4j:slf4j-api:2.0.6 -> 2.0.12
| +--- org.apache.logging.log4j:log4j-core:2.21.1
| | --- org.apache.logging.log4j:log4j-api:2.21.1
| --- org.apache.logging.log4j:log4j-jul:2.21.1
| --- org.apache.logging.log4j:log4j-api:2.21.1
--- org.infinispan.protostream:protostream:5.0.3.Final ()
from protostream.
Sorry Tristin, I am using gradle build not sure which specific javac command is being executed. Trying to check
from protostream.
Have also added this compiler arg from your doc:
tasks.withType(JavaCompile) {
configure(options) {
options.compilerArgs << '-Aprotostream-debug=true'
}
}
and this fails with key in annotation processor option '-Aprotostream-debug=true' is not a dot-separated sequence of identifiers
from protostream.
org/infinispan/protostream/annotations/ProtoSchema
is in org.infinispan.protostream:protostream
org.infinispan.protostream:protostream-processor
depends on that library.
I'm asking about the command-line, because it depends on whether it is using --processor-path
or the classpath and which -proc
options are being set. Also, which JDK are you using ?
from protostream.
I am using JDK 17
from protostream.
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?
from protostream.
Well, I'm surprised it worked for you with 4 and not 5, because the layout of the jars has not changed
from protostream.
as for the failure related to the annotation processor option, that's a bug. I'll fix it
from protostream.
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.
from protostream.
I'll try to set up a simple gradle build to see what's happening
from protostream.
Sure that sounds good, let me know if you require any info from my end
from protostream.
Btw, the debug option is -Aprotostream.debug=true
(dot instead of dash)
from protostream.
Thanks, that worked. Error is the same however:
java.lang.NoClassDefFoundError: org/infinispan/protostream/annotations/ProtoSchema
Iv included the following dependency as well but no luck yet:
implementation 'org.infinispan.protostream:protostream:5.0.1.Final'
from protostream.
Not sure if this is helpful but version 5.0.0.Dev01 works, although it generates a schema using proto2 syntax
from protostream.
This worked for me: https://github.com/tristantarrant/protostream-gradle
from protostream.
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?
from protostream.
For backwards compatibility. Use the following:
@ProtoSchema(schemaFileName = "simple.proto", includeClasses = Simple.class, syntax = ProtoSyntax.PROTO3)
from protostream.
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:
https://github.com/markosalazar/protostream-api-test-app
from protostream.
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
from protostream.
I modified my project to add implementation 'org.springframework.boot:spring-boot-starter-web:3.2.4'
but everything works. The only weird thing I see in your dependency tree is the downgrading of jackson: com.fasterxml.jackson.core:jackson-core:2.16.2 -> 2.15.4
Is there any more information from that exception java.lang.NoClassDefFoundError: org/infinispan/protostream/annotations/ProtoSchema
, such as the full stack trace with any additional causes ?
from protostream.
Related Issues (10)
- Support for generic marshallers HOT 3
- ObjectArrayAdapter generating marshaller in java.lang HOT 4
- ProtoReserved statements always commented in proto file HOT 1
- Compilation error "@ProtoAdapter can only be applied to classes" on enum HOT 5
- Protobuf encoding marshling is not working when in a Java collection is used in the value part of the map
- Use ByteBuddy instead of Javassist HOT 1
- ProtoField for abstract class HOT 7
- Caused by: org.infinispan.protostream.AnnotationParserException: Error: 1,43: illegal escape character: u HOT 2
- Standalone usage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protostream.