UNCLASSIFIED - NO CUI

Version 5.0 of the SonarQube scanner cli requires JDK17 and the image tagged with 5.0 uses JDK11

Summary

Running sonar-scanner in the image with the 5.0 tag produces the following error.

Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main 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

Steps to reproduce

$ podman run --rm -it registry1.dso.mil/ironbank/sonarsource/sonar-scanner-cli:5.0 bash bash-4.4$ sonar-scanner

What is the current bug behavior?

bash-4.4$ sonar-scanner Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main 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 bash-4.4$

What is the expected correct behavior?

sonar-scanner should run without errors about the Java class file version.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Possible fixes

Update the base image to the openjdk17.

Tasks

  • Bug has been identified and corrected within the container

Please read the Iron Bank Documentation for more info