Skip to content

Flow is not compatible with JDK 21 early access #17240

Closed

Description

@ZheSun88

Description of the bug

building flow with JDK 21 early access is not successful

[ERROR] Failed to execute goal org.jboss.jandex:jandex-maven-plugin:1.1.1:jandex (make-index) on project flow-jandex: Execution make-index of goal org.jboss.jandex:jandex-maven-plugin:1.1.1:jandex failed: Cannot read the array length because "bytes" is null -> [Help 2]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.jandex:jandex-maven-plugin:1.1.1:jandex (make-index) on project flow-jandex: Execution make-index of goal org.jboss.jandex:jandex-maven-plugin:1.1.1:jandex failed: Cannot read the array length because "bytes" is null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1583)

Expected behavior

build is successful with JDK 21 (official release on 19th Sept 2023)

Minimal reproducible example

  • take the current flow main branch
  • set java_home to the JDK 21 (Java version: 21-ea, vendor: Oracle Corporation)
  • run mvn -e -B -V -T 6 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn install -DskipTests

Versions

  • Java version: openjdk-21-ea+31

Activity

  1. ZheSun88 commented on Jul 26, 2023

    @ZheSun88
    MemberAuthor

    tested with upgrade jandex plugin to it latest(1.2.3), same error.
    This plugin has been archived..

  2. mcollovati commented on Jul 26, 2023

    @mcollovati
    Collaborator

    Can we give it a try to io.smallrye:jandex-maven-plugin?
    It is mentioned also in the Quarkus docs: https://quarkus.io/guides/maven-tooling#multi-module-maven

    https://smallrye.io/jandex/jandex/3.1.2/maven/basic.html

  3. ZheSun88 commented on Jul 26, 2023

    @ZheSun88
    MemberAuthor

    nice.. let me try.. i will create a PR if it works.

  4. ZheSun88 commented on Jul 26, 2023

    @ZheSun88
    MemberAuthor

    it works.. nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions