SonarCloud still complaining about Java 11 requirement

  • ALM used: Bitbucket Cloud

  • CI system used: Teamcity

  • Scanner command used when applicable:
    BEGIN:
    C:\BuildAgent\tools\sonar-scanner-msbuild.4.8.0.12008\MSBuild.SonarQube.Runner.exe “/d:project.home=.” “/d:sonar.host.url=https://sonarcloud.io” “/k:myproject.git” “/n:projectrepo” “/v:8924” “/d:sonar.login=” /d:sonar.cs.dotcover.reportsPaths=“coverage.html” /d:sonar.cs.nunit.reportsPaths=“nunit-results.xml” /o:outpath /d:sonar.exclusions= /d:sonar.pullrequest.branch=mybranch /d:sonar.pullrequest.key=2174 /d:sonar.pullrequest.base=develop /d:sonar.pullrequest.provider=bitbucketcloud /d:sonar.pullrequest.bitbucketcloud.owner= /d:sonar.pullrequest.bitbucketcloud.repository= /d:sonar.cpd.exclusions= begin

    END:
    C:\BuildAgent\tools\sonar-scanner-msbuild.4.8.0.12008\MSBuild.SonarQube.Runner.exe “/d:sonar.login=” end

  • Languages of the repository: C#, Typescript, Javascript, VB

  • Error observed: Even after updating our build agents to use OpenJDK 11, SonarCloud is still producing the deprecation warning around not using Java 11 to perform the local scans. Output from our build log is showing that the END process is running on OpenJDK 11 as follows:

[12:25:58] : [Step 8/9] Calling the SonarQube Scanner…
[12:25:59] : [Step 8/9] INFO: Scanner configuration file: C:\BuildAgent\tools\sonar-scanner-msbuild.4.8.0.12008\sonar-scanner-4.2.0.1873\bin…\conf\sonar-scanner.properties
[12:25:59] : [Step 8/9] INFO: Project root configuration file: C:\BuildAgent\work\777909b8dfbf5f08.sonarqube\out\sonar-project.properties
[12:25:59] : [Step 8/9] INFO: SonarQube Scanner 4.2.0.1873
[12:25:59] : [Step 8/9] INFO: Java 11.0.8 N/A (64-bit)
[12:25:59] : [Step 8/9] INFO: Windows Server 2019 10.0 amd64
[12:25:59] : [Step 8/9] INFO: User cache: C:\Users\ContainerAdministrator.sonar\cache
[12:26:00] : [Step 8/9] INFO: SonarQube server 8.0.0
[12:26:00] : [Step 8/9] INFO: Default locale: “en_US”, source code encoding: “windows-1252” (analysis is platform dependent)
[12:26:00] : [Step 8/9] INFO: Load global settings
[12:26:01] : [Step 8/9] INFO: Load global settings (done)
[12:26:01] : [Step 8/9] INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
[12:26:01] : [Step 8/9] INFO: User cache: C:\Users\ContainerAdministrator.sonar\cache
[12:26:01] : [Step 8/9] INFO: Load/download plugins
[12:26:01] : [Step 8/9] INFO: Load plugins index

I verified that the machines containing the build agents that run the scanner do not have any other java version loaded on them other than OpenJDK 11. Whats going to happen next month?

Apparently, just had to wait it out to see. The error went away today (Oct 1) with our builds. At this point, I’m assuming it was just a bug in the reporting of the warning.

Hi @mkoziel2000, i can’t find any related change at SonarCloud or SonarScannerMsbuild. Don’t hesitate to update here if you experience this same issue again.

I’ve had 21 days of builds without experiencing the Java warning. I suspect something environmental with our build setup. It might have been a build agent container in our cluster that didn’t get updated with the latest build image containing java 11. I’m guessing it eventually self-corrected as part of our weekly recycle activities.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.