Git Product home page Git Product logo

Comments (23)

tristantarrant avatar tristantarrant commented on May 28, 2024

can you paste the output of mvn dependency:tree here ?

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

I am using gradle. It works fine with version 4, but in version 5 I cannot get past this error.

from protostream.

tristantarrant avatar tristantarrant commented on May 28, 2024

can you get the actual javac command being executed ?

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

markosalazar avatar markosalazar commented on May 28, 2024

Sorry Tristin, I am using gradle build not sure which specific javac command is being executed. Trying to check

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

tristantarrant avatar tristantarrant commented on May 28, 2024

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.

markosalazar avatar markosalazar commented on May 28, 2024

I am using JDK 17

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

tristantarrant avatar tristantarrant commented on May 28, 2024

Well, I'm surprised it worked for you with 4 and not 5, because the layout of the jars has not changed

from protostream.

tristantarrant avatar tristantarrant commented on May 28, 2024

as for the failure related to the annotation processor option, that's a bug. I'll fix it

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

tristantarrant avatar tristantarrant commented on May 28, 2024

I'll try to set up a simple gradle build to see what's happening

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

Sure that sounds good, let me know if you require any info from my end

from protostream.

tristantarrant avatar tristantarrant commented on May 28, 2024

Btw, the debug option is -Aprotostream.debug=true (dot instead of dash)

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

markosalazar avatar markosalazar commented on May 28, 2024

Not sure if this is helpful but version 5.0.0.Dev01 works, although it generates a schema using proto2 syntax

from protostream.

tristantarrant avatar tristantarrant commented on May 28, 2024

This worked for me: https://github.com/tristantarrant/protostream-gradle

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

tristantarrant avatar tristantarrant commented on May 28, 2024

For backwards compatibility. Use the following:

@ProtoSchema(schemaFileName = "simple.proto", includeClasses = Simple.class, syntax = ProtoSyntax.PROTO3)

from protostream.

markosalazar avatar markosalazar commented on May 28, 2024

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.

markosalazar avatar markosalazar commented on May 28, 2024

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.

tristantarrant avatar tristantarrant commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.