Integrating Sonarqube analysis with CI build

Hi All,
I am trying to integrate sonarqube analysis with CI build in vsts .
I am getting the error below :
Exception in thread “main” java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/sonarsource/scanner/cli/Main, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:284)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:711)
at java.net.URLClassLoader.access$400(URLClassLoader.java:92)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1159)
at java.security.AccessController.doPrivileged(AccessController.java:314)
at java.net.URLClassLoader.findClass(URLClassLoader.java:594)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:711)
at java.lang.ClassLoader.loadClass(ClassLoader.java:679)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:658)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:488)
The SonarQube Scanner did not complete successfully
10:35:17.85 Post-processing failed. Exit code: 1
D:\VSTS Agent Folder_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.6.3\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe failed with return code: 1


How can i fix the same ?

Hi,

Which JDK is installed in the machine running this build ?

Thanks.

Mickaël

1 Like

Hi, java home environment variable was mapped to jdk7 , the issue is resolved after updating it to use jdk 8.

1 Like