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

BK build fails with jdk 21 (LTS) #4189

Closed
dlg99 opened this issue Jan 26, 2024 · 6 comments
Closed

BK build fails with jdk 21 (LTS) #4189

dlg99 opened this issue Jan 26, 2024 · 6 comments
Labels

Comments

@dlg99
Copy link
Contributor

dlg99 commented Jan 26, 2024

BUG REPORT

Describe the bug

BK build fails with jdk 21 (LTS)

To Reproduce

Steps to reproduce the behavior:

mvn clean install with jdk 21:

build fails with circe-checksum: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'

Expected behavior

build succeeds

Additional context

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project circe-checksum: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :circe-checksum

$ java -version
java version "21.0.1" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
@dlg99 dlg99 added the type/bug label Jan 26, 2024
@lhotari
Copy link
Member

lhotari commented Feb 7, 2024

In order to run the tests with Java 21, I think that we also need to get rid of PowerMock, #4201 .

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

Thanks to @nodece , PowerMock has been removed in #4212 and Mockito has been upgraded to 4.11 version in #4218.

Now there might be a chance to get JDK 21 build working. It might require some minor changes. The PRs in Pulsar to address JDK 21 build compatibility might be useful.

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

I upgraded a lot of things in the build while fixing CI. It seems that building with Java 21 just works now.

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

Even running tests seem to work with Java 21 since a lot of the dependencies were upgraded. I was doubting if Groovy 3 supports Java 21, but it seems that the 3.0.20 version does since it doesn't choke.

It looks like Groovy 3 runs on Java 21 since 3.0.17 version.

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

I think this issue can be closed as resolved. Obviously running all tests with Java 21 is a different matter and would require changes to CI to run also with Java 21. We have a scheduled build in Pulsar to run all tests with Java 21 once a day.

@shoothzj
Copy link
Member

@lhotari Thanks, let me verify it in my laptop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants