Template for a good new topic, formatted with Markdown:
ALM used (Azure DevOps)
CI system used (Azure DevOps
Scanner command used when applicable (private details masked)
Languages of the repository C#
Only if the SonarCloud project is public, the URL
And if you need help with pull request decoration, then the URL to the PR too
Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
Steps to reproduce
Run SonarCloudAnalysis using older java version than Java17
Potential workaround
N/A
#[error]java.lang.IllegalStateException: Failed to parse JSON in SONARQUBE_SCANNER_PARAMS environment variable Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
Hi @Colin, yes still getting errors after the removal of extra properties
2024-03-12T18:10:52.6529395Z ##[section]Starting: SonarCloudAnalyze
2024-03-12T18:10:52.6871549Z ==============================================================================
2024-03-12T18:10:52.6872303Z Task : Run Code Analysis
2024-03-12T18:10:52.6872417Z Description : Run scanner and upload the results to the SonarCloud server.
2024-03-12T18:10:52.6872522Z Version : 1.38.0
2024-03-12T18:10:52.6872904Z Author : sonarsource
2024-03-12T18:10:52.6873021Z Help : Version: 1.38.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
2024-03-12T18:10:52.6873281Z ==============================================================================
2024-03-12T18:10:53.1132823Z [command]D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.41.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
2024-03-12T18:10:53.1967342Z SonarScanner for MSBuild 5.15
2024-03-12T18:10:53.1968236Z Using the .NET Framework version of the Scanner for MSBuild
2024-03-12T18:10:53.2634147Z Post-processing started.
2024-03-12T18:10:53.4676079Z 18:10:53.465 Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: D:\a\1\.sonarqube\out\102\Issues_fixed.json
2024-03-12T18:10:53.9349118Z Calling the TFS Processor executable...
2024-03-12T18:10:54.1150350Z Attempting to locate the CodeCoverage.exe tool...
2024-03-12T18:10:54.1192053Z Attempting to locate the CodeCoverage.exe tool using setup configuration...
2024-03-12T18:10:54.1940941Z Code coverage command line tool: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
2024-03-12T18:10:54.2179867Z Fetching code coverage report information from TFS...
2024-03-12T18:10:54.2204584Z Attempting to locate a test results (.trx) file...
2024-03-12T18:10:57.0197526Z Looking for TRX files in: D:\a\1\TestResults, D:\a\1\s\src\Project\def\code\sitecore\shell\client\Applications\ContentTesting\Pages\TestResults
2024-03-12T18:10:57.0203142Z No test results files found
2024-03-12T18:10:58.8602537Z Did not find any binary coverage files in the expected location.
2024-03-12T18:10:58.8619601Z Falling back on locating coverage files in the agent temp directory.
2024-03-12T18:10:58.8623660Z Searching for coverage files in D:\a\_temp
2024-03-12T18:10:58.8629460Z No coverage files found in the agent temp directory.
2024-03-12T18:10:58.8630141Z Coverage report conversion completed successfully.
2024-03-12T18:10:58.8706099Z The TFS Processor has finished
2024-03-12T18:10:58.8769122Z Calling the SonarScanner CLI...
2024-03-12T18:11:00.9393181Z INFO: Scanner configuration file: D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.41.0\classic-sonar-scanner-msbuild\sonar-scanner-4.8.1.3023\bin\..\conf\sonar-scanner.properties
2024-03-12T18:11:00.9437384Z INFO: Project root configuration file: D:\a\1\.sonarqube\out\sonar-project.properties
2024-03-12T18:11:01.6477521Z INFO: SonarScanner 4.8.1.3023
2024-03-12T18:11:01.6478745Z INFO: Java 11.0.22 Eclipse Adoptium (64-bit)
2024-03-12T18:11:01.6479429Z INFO: Windows Server 2022 10.0 amd64
2024-03-12T18:11:03.6040334Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2024-03-12T18:11:06.4290101Z INFO: Analyzing on SonarCloud
2024-03-12T18:11:06.4290877Z INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2024-03-12T18:11:07.6972465Z INFO: Load global settings
2024-03-12T18:11:07.9791193Z INFO: Load global settings (done) | time=282ms
2024-03-12T18:11:07.9868403Z INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
2024-03-12T18:11:08.0034693Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2024-03-12T18:11:08.0218138Z INFO: Loading required plugins
2024-03-12T18:11:08.0220334Z INFO: Load plugins index
2024-03-12T18:11:08.3012088Z INFO: Load plugins index (done) | time=281ms
2024-03-12T18:11:08.3018160Z INFO: Load/download plugins
2024-03-12T18:11:09.6337545Z INFO: Load/download plugins (done) | time=969ms
2024-03-12T18:11:09.6338835Z INFO: ------------------------------------------------------------------------
2024-03-12T18:11:09.6345611Z INFO: EXECUTION FAILURE
2024-03-12T18:11:09.6346583Z INFO: ------------------------------------------------------------------------
2024-03-12T18:11:09.6346910Z INFO: Total time: 8.567s
2024-03-12T18:11:09.6347150Z INFO: Final Memory: 10M/37M
2024-03-12T18:11:09.6347543Z INFO: ------------------------------------------------------------------------
2024-03-12T18:11:09.6348638Z ##[error]ERROR: Error during SonarScanner execution
2024-03-12T18:11:09.6349414Z ERROR: Error during SonarScanner execution
2024-03-12T18:11:09.6350082Z ##[error]java.lang.IllegalStateException: The plugin [java] does not support Java 11.0.22
2024-03-12T18:11:09.6350614Z java.lang.IllegalStateException: The plugin [java] does not support Java 11.0.22
2024-03-12T18:11:09.6351231Z ##[error]at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:123)
2024-03-12T18:11:09.6352014Z at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:123)
2024-03-12T18:11:09.6353119Z ##[error]at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:54)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)
2024-03-12T18:11:09.6354178Z at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:54)
2024-03-12T18:11:09.6354609Z at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)
2024-03-12T18:11:09.6355451Z ##[error]at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:26)
2024-03-12T18:11:09.6356200Z at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:26)
2024-03-12T18:11:09.6357164Z ##[error]at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
2024-03-12T18:11:09.6358987Z at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
2024-03-12T18:11:09.6359688Z ##[error]at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
2024-03-12T18:11:09.6360283Z at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
2024-03-12T18:11:09.6360860Z ##[error]at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
2024-03-12T18:11:09.6361437Z at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
2024-03-12T18:11:09.6361972Z ##[error]at org.picocontainer.behaviors.Stored.start(Stored.java:110)
2024-03-12T18:11:09.6362502Z at org.picocontainer.behaviors.Stored.start(Stored.java:110)
2024-03-12T18:11:09.6363299Z ##[error]at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
2024-03-12T18:11:09.6363925Z at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
2024-03-12T18:11:09.6364571Z ##[error]at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
2024-03-12T18:11:09.6365180Z at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
2024-03-12T18:11:09.6365768Z ##[error]at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
2024-03-12T18:11:09.6366504Z at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
2024-03-12T18:11:09.6367084Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
2024-03-12T18:11:09.6367681Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
2024-03-12T18:11:09.6368260Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-03-12T18:11:09.6370147Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-03-12T18:11:09.6370772Z ##[error]at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
2024-03-12T18:11:09.6371324Z at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
2024-03-12T18:11:09.6371873Z ##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
2024-03-12T18:11:09.6372440Z at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
2024-03-12T18:11:09.6373244Z ##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2024-03-12T18:11:09.6373911Z at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2024-03-12T18:11:09.6374703Z ##[error]at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-03-12T18:11:09.6375378Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-03-12T18:11:09.6387095Z ##[error]at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.UnsupportedClassVersionError: org/sonar/plugins/java/JavaPlugin 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
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:121)
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:23)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:83)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:72)
at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:121)
... 26 more
ERROR:
2024-03-12T18:11:09.6390435Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2024-03-12T18:11:09.6390795Z at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2024-03-12T18:11:09.6391082Z at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2024-03-12T18:11:09.6391453Z at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2024-03-12T18:11:09.6391779Z at com.sun.proxy.$Proxy0.execute(Unknown Source)
2024-03-12T18:11:09.6392094Z at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2024-03-12T18:11:09.6392462Z at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2024-03-12T18:11:09.6392798Z at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
2024-03-12T18:11:09.6393093Z at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
2024-03-12T18:11:09.6393401Z at org.sonarsource.scanner.cli.Main.main(Main.java:62)
2024-03-12T18:11:09.6394015Z Caused by: java.lang.UnsupportedClassVersionError: org/sonar/plugins/java/JavaPlugin 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
2024-03-12T18:11:09.6394582Z at java.base/java.lang.ClassLoader.defineClass1(Native Method)
2024-03-12T18:11:09.6394883Z at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
2024-03-12T18:11:09.6395222Z at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
2024-03-12T18:11:09.6395561Z at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
2024-03-12T18:11:09.6395863Z at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
2024-03-12T18:11:09.6396182Z at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
2024-03-12T18:11:09.6396481Z at java.base/java.security.AccessController.doPrivileged(Native Method)
2024-03-12T18:11:09.6396774Z at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
2024-03-12T18:11:09.6397612Z at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:121)
2024-03-12T18:11:09.6397995Z at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:23)
2024-03-12T18:11:09.6398314Z at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:83)
2024-03-12T18:11:09.6398643Z at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:72)
2024-03-12T18:11:09.6398980Z at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:121)
2024-03-12T18:11:09.6399257Z ... 26 more
2024-03-12T18:11:09.6399386Z ERROR:
2024-03-12T18:11:10.0044850Z ##[error]The SonarScanner did not complete successfully
2024-03-12T18:11:10.0047180Z The SonarScanner did not complete successfully
2024-03-12T18:11:10.0050349Z ##[error]18:11:09.993 Post-processing failed. Exit code: 1
2024-03-12T18:11:10.0051690Z 18:11:09.993 Post-processing failed. Exit code: 1
2024-03-12T18:11:10.0196201Z ##[error]The process 'D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.41.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
2024-03-12T18:11:10.0277691Z ##[section]Finishing: SonarCloudAnalyze
Thanks for your support @Colin appreciate it, Get it working now Since we just changed the Java version, do I need to validate anything? expecting everything to behave as before
It should all work as before – but if those inclusions/exclusions are still removed (and you need to add them back)… well, we’ll have to troubleshoot why they’re causing this error.