Skip to content

Conversation

@jeeminso
Copy link
Contributor

@jeeminso jeeminso commented Nov 4, 2025

Summary of the changes / Why this is an improvement

When trying to run crate-qa on a specific branch, an error like below is observed:

java.lang.UnsupportedClassVersionError: com/puppycrawl/tools/checkstyle/api/CheckstyleException has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Checklist

  • Link to issue this PR refers to (if applicable): Fixes #???

@jeeminso
Copy link
Contributor Author

jeeminso commented Nov 4, 2025

Failure:

test_metadata_compatibility (test_upgrade.DefaultTemplateMetaDataCompatibilityTest.test_metadata_compatibility) ... Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Removed server http://127.0.0.1:4200/ from active pool
ERROR

@jeeminso
Copy link
Contributor Author

jeeminso commented Nov 4, 2025

Hi @mfussenegger would you have any suggestions for #380 (comment)? I could not find out where this option was coming from.

@mfussenegger
Copy link
Member

mfussenegger commented Nov 4, 2025

Hi @mfussenegger would you have any suggestions for #380 (comment)? I could not find out where this option was coming from.

Earlier versions of CrateDB used UseConcMarkSweepGC as garbage collector. That was removed in later JDK versions (https://openjdk.org/jeps/363) - hence the error.
One option could be to try and setting CRATE_JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions" for the older CrateDB versions.

If that doesn't work we may have to extend the logic in https://codeberg.org/mfussenegger/cr/src/commit/master/cr8/java_magic.py so that it searches and uses an older JDK for those versions.

Or maybe we find a way to have checkstyle run using the toolchain, so it doesn't depend on having JDK17 available for the build.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants