user4948798
user4948798

Reputation: 2094

Jenkins-SonarRunnerInstallation - Unsupported major.minor version 52.0

I have problem with Jenkins – Execute SonarQube Scanner Build Option.

Our Environment details as follows:

 - Jenkins controller Server OS: Ubuntu-12.04 LTS-64 Bit. 
 - controller Server Jenkins Version: 2.46.2 
 - SonarQube Scanner Plugin for Jenkins -Version - 2.6.1 
 - Build Type: controller and agent based.  
 - Agent Machine: Ubuntu-14.04-LTS (64-Bit)  
 - SonarQube Server Version - 5.1 (64-Bit)  
 - Sonar-runner version 2.4  
 - Agent Machine Java Version – 1.8

Problem Description:- I have defined the sonar.project.properties information under the “Analysis properties” category in Jenkins controller server itself, When I tried to execute the same through it fails with below errors.java.lang.UnsupportedClassVersionError:

hudson/plugins/sonar/SonarRunnerInstallation$1 : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
Caused: java.lang.ClassFormatError: Failed to load hudson.plugins.sonar.SonarRunnerInstallation$1

Upvotes: 3

Views: 3895

Answers (1)

Denis Ismailovski
Denis Ismailovski

Reputation: 321

The issue is because of Java version mismatch. From the Wikipedia Java Class Reference you can fin all the codes: J2SE 8 = 52,J2SE 7 = 51,J2SE 6.0 = 50,J2SE 5.0 = 49

This error is caused becaused you are using a lower JDK at runtime (probably 7) than 8 that is the one used to compile that version of Jenkins

Upvotes: 6

Related Questions