I’m trying to upgrade the java version from 11 to 17 and to that, I have change the JDK11 (openjdk11-openj9:alpine-slim) to JDK17(gradle:8.2.0-jdk17-jammy) and in gradle-wrapper.properties file I have updated the version of Gradle as well (6.9.2 to 8.1.1). We are using OpenApi to generate the API’s.
Before Changing the JDK and Gradle version, when OpenApiGenerate all the api’s I never face the compilation issue rather for all the api’s it gives the “warning: @Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final.”
But after Changing the JDK and Gradle version, instead of warning it started to throw compilation error for all the api’s.
**Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
100 errors
only showing the first 100 errors, of 502 total; use -Xmaxerrs if you would like to see more
Task :compileJava FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:compileJava’.
Compilation failed; see the compiler error output for details.
- Try:
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.
- Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:compileJava’.**
Can someone please guide me what I’m doing wrong and how to fix this issue.
1