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

Helidon 3.x build fails with Java 21 #9346

Open
wants to merge 7 commits into
base: helidon-3.x
Choose a base branch
from

Conversation

jbescos
Copy link
Member

@jbescos jbescos commented Oct 9, 2024

Description

#9024

The index is correctly generated now

[INFO] --- jandex:1.2.3:jandex (make-index) @ helidon-microprofile-graphql-server ---
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=98598, ConflictMarker.markTime=17902, ConflictMarker.nodeCount=3, ConflictIdSorter.graphTime=4656, ConflictIdSorter.topsortTime=8013, ConflictIdSorter.conflictIdCount=3, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=66435, ConflictResolver.conflictItemCount=3, DfDependencyCollector.collectTime=9856673, DfDependencyCollector.transformTime=210448}
[DEBUG] org.jboss.jandex:jandex-maven-plugin:jar:1.2.3
[DEBUG]    io.smallrye:jandex:jar:3.1.8:runtime
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.3.0:compile
[DEBUG] Created new class realm plugin>org.jboss.jandex:jandex-maven-plugin:1.2.3
[DEBUG] Importing foreign packages into class realm plugin>org.jboss.jandex:jandex-maven-plugin:1.2.3
[DEBUG]   Imported:  < project>io.helidon.microprofile.graphql:helidon-microprofile-graphql-server:3.2.11-SNAPSHOT
[DEBUG] Populating class realm plugin>org.jboss.jandex:jandex-maven-plugin:1.2.3
[DEBUG]   Included: org.jboss.jandex:jandex-maven-plugin:jar:1.2.3
[DEBUG]   Included: io.smallrye:jandex:jar:3.1.8
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.3.0
[DEBUG] Loading mojo org.jboss.jandex:jandex-maven-plugin:1.2.3:jandex from plugin realm ClassRealm[plugin>org.jboss.jandex:jandex-maven-plugin:1.2.3, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@4f2410ac]
[DEBUG] Configuring mojo execution 'org.jboss.jandex:jandex-maven-plugin:1.2.3:jandex:make-index' with basic configurator -->
[DEBUG]   (f) classesDir = /home/jbescos/workspace/helidon/microprofile/graphql/server/target/classes
[DEBUG]   (s) directory = /home/jbescos/workspace/helidon/microprofile/graphql/server/target/classes
[DEBUG]   (s) directory = /home/jbescos/workspace/helidon/microprofile/graphql/server/target/test-classes
[DEBUG]   (f) fileSets = [org.jboss.jandex.maven.FileSet@4cf7e832, org.jboss.jandex.maven.FileSet@7e0a1220]
[DEBUG]   (s) indexName = jandex.idx
[DEBUG]   (f) processDefaultFileSet = true
[DEBUG]   (s) skip = false
[DEBUG]   (s) verbose = false
[DEBUG] -- end configuration --
[INFO] Saving Jandex index: /home/jbescos/workspace/helidon/microprofile/graphql/server/target/classes/META-INF/jandex.idx
[INFO] Saving Jandex index: /home/jbescos/workspace/helidon/microprofile/graphql/server/target/test-classes/META-INF/jandex.idx
[INFO] 

Documentation

NA

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 9, 2024
@jbescos jbescos self-assigned this Oct 9, 2024
@jbescos jbescos marked this pull request as draft October 9, 2024 15:42
@jbescos jbescos marked this pull request as ready for review October 9, 2024 16:07
@jbescos jbescos marked this pull request as draft October 9, 2024 16:08
Signed-off-by: Jorge Bescos Gascon <[email protected]>
@jbescos jbescos marked this pull request as ready for review October 9, 2024 17:01
@jbescos jbescos changed the title Helidon 3.x build fails with GraalVM 21.0.4+8.1 #9024 Helidon 3.x build fails with Java 21 Oct 14, 2024
Signed-off-by: Jorge Bescos Gascon <[email protected]>
@jbescos
Copy link
Member Author

jbescos commented Oct 15, 2024

@tjquinno I saw in the history that you have experience in open-api. Do you happen to know why this TCK is failing?:

Failed tests: 
org.eclipse.microprofile.openapi.tck.AirlinesAppTest.testSchemaProperty(org.eclipse.microprofile.openapi.tck.AirlinesAppTest)
  Run 1: AirlinesAppTest>Arquillian.run:138->testSchemaProperty:681 1 expectation failed.
JSON path components.schemas.User.properties.phone.example doesn't match.
Expected: 123-456-7891
  Actual: 123

Is it maybe related to the snakeyaml-codegen-maven-plugin ?

@jbescos jbescos requested a review from tjquinno October 15, 2024 12:26
@tjquinno
Copy link
Member

I added a commit that backports a scanning enhancement from 4.x that fixes the TCK failure.

Copy link
Member

@barchetta barchetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be clear that we have no requirement to build the helidon-3.x branch using Java 21. We are only doing this for the convenience of people working on Helidon. Therefore we need to be very careful that this change does not introduce any incompatibilities. I'm concerned about the upgrading of jandex as we've had issues in this area before.

Please make sure you do some backwards compatibility testing. For example please try the example https://github.com/helidon-io/helidon-examples/tree/3.2.10/examples/quickstarts/helidon-standalone-quickstart-mp (with no modification!) against your changes and run the built project with java -jar. I want to make sure that the indexes generated by that example work at runtime with the changes you are making here.

You might want to extend that example to use openapi to exercise that code as well.

Signed-off-by: Jorge Bescos Gascon <[email protected]>
@jbescos
Copy link
Member Author

jbescos commented Oct 17, 2024

We should be clear that we have no requirement to build the helidon-3.x branch using Java 21. We are only doing this for the convenience of people working on Helidon. Therefore we need to be very careful that this change does not introduce any incompatibilities. I'm concerned about the upgrading of jandex as we've had issues in this area before.

Please make sure you do some backwards compatibility testing. For example please try the example https://github.com/helidon-io/helidon-examples/tree/3.2.10/examples/quickstarts/helidon-standalone-quickstart-mp (with no modification!) against your changes and run the built project with java -jar. I want to make sure that the indexes generated by that example work at runtime with the changes you are making here.

You might want to extend that example to use openapi to exercise that code as well.

I executed it with this manifest (note it refers to version 3.2.11-SNAPSHOT, which is the version that contains my changes):

Manifest-Version: 1.0
Created-By: Apache Maven 3.9.5
Built-By: jbescos
Build-Jdk: 17.0.5
Class-Path: libs/helidon-microprofile-3.2.11-SNAPSHOT.jar libs/helidon-m
 icroprofile-core-3.2.11-SNAPSHOT.jar libs/helidon-microprofile-server-3
 .2.11-SNAPSHOT.jar libs/helidon-microprofile-cdi-3.2.11-SNAPSHOT.jar li
 bs/weld-se-core-3.2.11-SNAPSHOT.jar libs/weld-core-impl-3.2.11-SNAPSHOT
 .jar libs/weld-environment-common-4.0.3.Final.jar libs/jboss-logging-3.
 5.3.Final.jar libs/jboss-classfilewriter-1.2.5.Final.jar libs/helidon-w
 ebserver-3.2.11-SNAPSHOT.jar libs/helidon-media-common-3.2.11-SNAPSHOT.
 jar libs/helidon-logging-common-3.2.11-SNAPSHOT.jar libs/netty-codec-ht
 tp-4.1.108.Final.jar libs/netty-common-4.1.108.Final.jar libs/netty-tra
 nsport-4.1.108.Final.jar libs/netty-codec-4.1.108.Final.jar libs/netty-
 handler-4.1.108.Final.jar libs/netty-resolver-4.1.108.Final.jar libs/ne
 tty-transport-native-unix-common-4.1.108.Final.jar libs/helidon-webserv
 er-static-content-3.2.11-SNAPSHOT.jar libs/helidon-webserver-jersey-3.2
 .11-SNAPSHOT.jar libs/helidon-jersey-server-3.2.11-SNAPSHOT.jar libs/ne
 tty-buffer-4.1.108.Final.jar libs/jakarta.interceptor-api-2.0.0.jar lib
 s/helidon-media-jsonp-3.2.11-SNAPSHOT.jar libs/helidon-jersey-media-jso
 np-3.2.11-SNAPSHOT.jar libs/jersey-media-json-processing-3.0.14.jar lib
 s/helidon-microprofile-config-3.2.11-SNAPSHOT.jar libs/helidon-config-m
 p-3.2.11-SNAPSHOT.jar libs/helidon-config-yaml-3.2.11-SNAPSHOT.jar libs
 /snakeyaml-2.2.jar libs/helidon-config-encryption-3.2.11-SNAPSHOT.jar l
 ibs/helidon-common-key-util-3.2.11-SNAPSHOT.jar libs/helidon-common-cry
 pto-3.2.11-SNAPSHOT.jar libs/helidon-config-object-mapping-3.2.11-SNAPS
 HOT.jar libs/helidon-microprofile-health-3.2.11-SNAPSHOT.jar libs/helid
 on-health-3.2.11-SNAPSHOT.jar libs/helidon-service-common-rest-3.2.11-S
 NAPSHOT.jar libs/microprofile-config-api-3.0.1.jar libs/microprofile-he
 alth-api-4.0.jar libs/helidon-health-common-3.2.11-SNAPSHOT.jar libs/he
 lidon-service-common-rest-cdi-3.2.11-SNAPSHOT.jar libs/helidon-health-c
 hecks-3.2.11-SNAPSHOT.jar libs/helidon-config-3.2.11-SNAPSHOT.jar libs/
 helidon-common-media-type-3.2.11-SNAPSHOT.jar libs/helidon-microprofile
 -metrics-3.2.11-SNAPSHOT.jar libs/helidon-common-3.2.11-SNAPSHOT.jar li
 bs/helidon-metrics-api-3.2.11-SNAPSHOT.jar libs/helidon-common-http-3.2
 .11-SNAPSHOT.jar libs/helidon-metrics-service-api-3.2.11-SNAPSHOT.jar l
 ibs/helidon-common-service-loader-3.2.11-SNAPSHOT.jar libs/helidon-metr
 ics-3.2.11-SNAPSHOT.jar libs/helidon-webserver-cors-3.2.11-SNAPSHOT.jar
  libs/microprofile-metrics-api-4.0.jar libs/helidon-microprofile-fault-
 tolerance-3.2.11-SNAPSHOT.jar libs/microprofile-fault-tolerance-api-4.0
 .jar libs/helidon-fault-tolerance-3.2.11-SNAPSHOT.jar libs/helidon-comm
 on-reactive-3.2.11-SNAPSHOT.jar libs/helidon-common-mapper-3.2.11-SNAPS
 HOT.jar libs/helidon-common-configurable-3.2.11-SNAPSHOT.jar libs/jerse
 y-weld2-se-3.0.14.jar libs/jersey-server-3.0.14.jar libs/jakarta.valida
 tion-api-3.0.2.jar libs/jersey-cdi1x-3.0.14.jar libs/weld-api-4.0.SP1.j
 ar libs/weld-spi-4.0.SP1.jar libs/helidon-microprofile-jwt-auth-3.2.11-
 SNAPSHOT.jar libs/microprofile-jwt-auth-api-2.0.jar libs/helidon-securi
 ty-jwt-3.2.11-SNAPSHOT.jar libs/helidon-security-util-3.2.11-SNAPSHOT.j
 ar libs/helidon-security-3.2.11-SNAPSHOT.jar libs/helidon-tracing-3.2.1
 1-SNAPSHOT.jar libs/helidon-security-integration-jersey-3.2.11-SNAPSHOT
 .jar libs/helidon-security-annotations-3.2.11-SNAPSHOT.jar libs/opentra
 cing-util-0.33.0.jar libs/helidon-microprofile-security-3.2.11-SNAPSHOT
 .jar libs/helidon-bundles-security-3.2.11-SNAPSHOT.jar libs/helidon-sec
 urity-providers-header-3.2.11-SNAPSHOT.jar libs/helidon-security-provid
 ers-http-auth-3.2.11-SNAPSHOT.jar libs/helidon-security-providers-http-
 sign-3.2.11-SNAPSHOT.jar libs/helidon-security-providers-jwt-3.2.11-SNA
 PSHOT.jar libs/helidon-security-providers-abac-3.2.11-SNAPSHOT.jar libs
 /helidon-security-providers-oidc-3.2.11-SNAPSHOT.jar libs/helidon-secur
 ity-providers-oidc-common-3.2.11-SNAPSHOT.jar libs/helidon-webclient-se
 curity-3.2.11-SNAPSHOT.jar libs/helidon-webclient-tracing-3.2.11-SNAPSH
 OT.jar libs/helidon-webclient-3.2.11-SNAPSHOT.jar libs/netty-handler-pr
 oxy-4.1.108.Final.jar libs/netty-codec-socks-4.1.108.Final.jar libs/net
 ty-resolver-dns-4.1.108.Final.jar libs/netty-codec-dns-4.1.108.Final.ja
 r libs/helidon-security-abac-time-3.2.11-SNAPSHOT.jar libs/helidon-secu
 rity-abac-role-3.2.11-SNAPSHOT.jar libs/helidon-security-abac-scope-3.2
 .11-SNAPSHOT.jar libs/helidon-security-abac-policy-3.2.11-SNAPSHOT.jar 
 libs/helidon-security-integration-webserver-3.2.11-SNAPSHOT.jar libs/he
 lidon-security-providers-common-3.2.11-SNAPSHOT.jar libs/helidon-securi
 ty-integration-jersey-client-3.2.11-SNAPSHOT.jar libs/helidon-security-
 integration-common-3.2.11-SNAPSHOT.jar libs/helidon-tracing-config-3.2.
 11-SNAPSHOT.jar libs/helidon-jersey-common-3.2.11-SNAPSHOT.jar libs/hel
 idon-webclient-jaxrs-3.2.11-SNAPSHOT.jar libs/helidon-microprofile-open
 api-3.2.11-SNAPSHOT.jar libs/helidon-openapi-3.2.11-SNAPSHOT.jar libs/s
 mallrye-open-api-core-2.1.24.jar libs/smallrye-open-api-jaxrs-2.1.24.ja
 r libs/microprofile-openapi-api-3.0.jar libs/helidon-microprofile-rest-
 client-3.2.11-SNAPSHOT.jar libs/microprofile-rest-client-api-3.0.jar li
 bs/helidon-common-context-3.2.11-SNAPSHOT.jar libs/jersey-mp-rest-clien
 t-3.0.14.jar libs/parsson-media-1.0.5.jar libs/reactive-streams-1.0.4.j
 ar libs/jersey-media-sse-3.0.14.jar libs/helidon-microprofile-tracing-3
 .2.11-SNAPSHOT.jar libs/helidon-tracing-opentracing-3.2.11-SNAPSHOT.jar
  libs/helidon-tracing-opentelemetry-3.2.11-SNAPSHOT.jar libs/openteleme
 try-api-1.22.0.jar libs/opentelemetry-context-1.22.0.jar libs/opentelem
 etry-semconv-1.22.0-alpha.jar libs/opentelemetry-extension-trace-propag
 ators-1.22.0.jar libs/opentelemetry-opentracing-shim-1.22.0-alpha.jar l
 ibs/opentracing-api-0.33.0.jar libs/opentracing-noop-0.33.0.jar libs/he
 lidon-tracing-jersey-3.2.11-SNAPSHOT.jar libs/helidon-tracing-jersey-cl
 ient-3.2.11-SNAPSHOT.jar libs/microprofile-opentracing-api-3.0.jar libs
 /helidon-tracing-tracer-resolver-3.2.11-SNAPSHOT.jar libs/opentracing-t
 racerresolver-0.1.8.jar libs/jakarta.json.bind-api-2.0.0.jar libs/yasso
 n-2.0.4.jar libs/jakarta.json-2.0.0-module.jar libs/jersey-media-json-b
 inding-3.0.14.jar libs/jersey-common-3.0.14.jar libs/jakarta.ws.rs-api-
 3.0.0.jar libs/jakarta.annotation-api-2.0.0.jar libs/jakarta.inject-api
 -2.0.0.jar libs/osgi-resource-locator-1.0.3.jar libs/jakarta.json-api-2
 .0.2.jar libs/parsson-1.0.5.jar libs/jandex-3.0.8.jar libs/helidon-jers
 ey-client-3.2.11-SNAPSHOT.jar libs/jersey-client-3.0.14.jar libs/jersey
 -hk2-3.0.14.jar libs/hk2-locator-3.0.6.jar libs/aopalliance-repackaged-
 3.0.6.jar libs/hk2-api-3.0.6.jar libs/hk2-utils-3.0.6.jar libs/javassis
 t-3.30.2-GA.jar libs/jakarta.xml.bind-api-3.0.1.jar libs/jakarta.activa
 tion-2.0.1.jar libs/jakarta.enterprise.cdi-api-3.0.0.jar libs/jakarta.e
 l-api-4.0.0.jar libs/helidon-config-yaml-mp-3.2.11-SNAPSHOT.jar
Main-Class: io.helidon.microprofile.cdi.Main

This is the output:

jbescos@jbescos-PORTEGE-X40-K:~/workspace/helidon-examples/examples/quickstarts/helidon-standalone-quickstart-mp$ java -jar target/helidon-standalone-quickstart-mp.jar 
2024.10.17 09:59:11 INFO io.helidon.common.LogConfig Thread[#1,main,5,main]: Logging at initialization configured using classpath: /logging.properties
2024.10.17 09:59:12 INFO io.helidon.tracing.tracerresolver.TracerResolverBuilder Thread[#1,main,5,main]: TracerResolver not configured, tracing is disabled
2024.10.17 09:59:12 INFO io.helidon.microprofile.security.SecurityCdiExtension Thread[#1,main,5,main]: Authentication provider is missing from security configuration, but security extension for microprofile is enabled (requires providers configuration at key security.providers). Security will not have any valid authentication provider
2024.10.17 09:59:12 INFO io.helidon.microprofile.security.SecurityCdiExtension Thread[#1,main,5,main]: Authorization provider is missing from security configuration, but security extension for microprofile is enabled (requires providers configuration at key security.providers). ABAC provider is configured for authorization.
2024.10.17 09:59:12 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[#1,main,5,main]: Registering JAX-RS Application: HelidonMP
2024.10.17 09:59:12 INFO io.helidon.webserver.NettyWebServer Thread[#107,nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x291e3286, L:/[0:0:0:0:0:0:0:0]:8080]
2024.10.17 09:59:12 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[#1,main,5,main]: Server started on http://localhost:8080 (and all other host addresses) in 1361 milliseconds (since JVM startup).
2024.10.17 09:59:12 INFO io.helidon.common.HelidonFeatures Thread[#108,features-thread,5,main]: Helidon MP 3.2.11-SNAPSHOT features: [CDI, Config, Fault Tolerance, Health, JAX-RS, Metrics, Open API, REST Client, Security, Server, Tracing]

And these are the commands I executed:

jbescos@jbescos-PORTEGE-X40-K:~/workspace/helidon$ curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}jbescos@jbescos-PORTEGE-X40-K:~/workspace/helidon$ curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}jbescos@jbescos-PORTEGE-X40curl -X PUT -H "Content-Type: application/json" -d '{"message" : "Hola"}' http://localhost:8080/greet/greetinghost:8080/greet/greeting
jbescos@jbescos-PORTEGE-X40-K:~/workspace/helidon$ curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants