Unsupported major.minor version 52.0

2,272 views
Skip to first unread message

Stas Roshkolets

unread,
Mar 1, 2017, 2:00:23 AM3/1/17
to SonarQube
Hello,
we get an error "Caused by: java.lang.UnsupportedClassVersionError: hudson/plugins/sonar/SonarRunnerInstallation$1 : Unsupported major.minor version 52.0" while running Sonar job in Jenkins.
The Node where sonar-runner runs already has JDK1.8:

> java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

 > javac -version
javac 1.8.0_60

Do you know what can be an issue?

Julien Lancelot

unread,
Mar 1, 2017, 4:26:04 AM3/1/17
to Stas Roshkolets, SonarQube
Hi Stas,

Could you please send us the SonarQube version, and some more logs about the analysis ?

Regards,

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/ecb35a40-594d-4516-a83e-e2cf6103edd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Julien LANCELOT | SonarSource

Stas Roshkolets

unread,
Mar 1, 2017, 7:22:59 AM3/1/17
to SonarQube, stas...@gmail.com
Sonar version is 5.5:
SonarQube™ technology is powered by SonarSource SA
Version 5.5 - LGPL v3 - Community - Documentation - Get Support - Plugins - Web API

sonar-runner version 2.5

ERROR:
10:37:18 Started by user Stanislav Roshkulets
10:37:18 [EnvInject] - Loading node environment variables.
10:37:18 Building remotely on hudson_illin1908 in workspace /epcuser/lunt/epc/hudson/workspace/MEC-MAIN_MAT_Sonar_Reports
10:37:18 FATAL: Remote call on hudson_illin1908 failed
10:37:18 java.io.IOException: Remote call on hudson_illin1908 failed
10:37:18 	at hudson.remoting.Channel.call(Channel.java:805)
10:37:18 	at hudson.plugins.sonar.SonarRunnerInstallation.getExecutable(SonarRunnerInstallation.java:74)
10:37:18 	at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:278)
10:37:18 	at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:259)
10:37:18 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
10:37:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
10:37:18 	at hudson.model.Build$BuildExecution.build(Build.java:205)
10:37:18 	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
10:37:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
10:37:18 	at hudson.model.Run.execute(Run.java:1720)
10:37:18 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
10:37:18 	at hudson.model.ResourceController.execute(ResourceController.java:98)
10:37:18 	at hudson.model.Executor.run(Executor.java:404)
10:37:18 Caused by: java.lang.ClassFormatError: Failed to load hudson.plugins.sonar.SonarRunnerInstallation$1
10:37:18 	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:375)
10:37:18 	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
10:37:18 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
10:37:18 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
10:37:18 	at java.lang.Class.forName0(Native Method)
10:37:18 	at java.lang.Class.forName(Class.java:274)
10:37:18 	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
10:37:18 	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
10:37:18 	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
10:37:18 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
10:37:18 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
10:37:18 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
10:37:18 	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
10:37:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
10:37:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
10:37:18 	at hudson.remoting.Request$2.run(Request.java:332)
10:37:18 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
10:37:18 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
10:37:18 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
10:37:18 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
10:37:18 	at java.lang.Thread.run(Thread.java:745)
10:37:18 	at ......remote call to hudson_illin1908(Native Method)
10:37:18 	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
10:37:18 	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
10:37:18 	at hudson.remoting.Channel.call(Channel.java:797)
10:37:18 	... 12 more
10:37:18 Caused by: java.lang.UnsupportedClassVersionError: hudson/plugins/sonar/SonarRunnerInstallation$1 : Unsupported major.minor version 52.0
10:37:18 	at java.lang.ClassLoader.defineClass1(Native Method)
10:37:18 	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
10:37:18 	at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
10:37:18 	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
10:37:18 	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
10:37:18 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
10:37:18 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
10:37:18 	at java.lang.Class.forName0(Native Method)
10:37:18 	at java.lang.Class.forName(Class.java:274)
10:37:18 	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:124)
10:37:18 	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
10:37:18 	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
10:37:18 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
10:37:18 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
10:37:18 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
10:37:18 	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
10:37:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
10:37:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
10:37:18 	at hudson.remoting.Request$2.run(Request.java:332)
10:37:18 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
10:37:18 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
10:37:18 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
10:37:18 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
10:37:18 	at java.lang.Thread.run(Thread.java:745)
10:37:18 Finished: FAILURE

Duarte Meneses

unread,
Mar 1, 2017, 7:35:18 AM3/1/17
to SonarQube, stas...@gmail.com
Hi,

Sonar-scanner needs Java 8. So in your case, please try running Jenkins with Java 8.

Stas Roshkolets

unread,
Mar 1, 2017, 7:54:02 AM3/1/17
to SonarQube, stas...@gmail.com
Hi,
Also Jenkins use Java 8
jenkins@illin4237!:jenkins> java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
jenkins@illin4237!:jenkins> javac -version
javac 1.8.0_60


And sonar-runner run on the node/slave and not on master itself so it should be related to node/slave configurations and no Jenkins, right?

Stas Roshkolets

unread,
Mar 2, 2017, 6:02:49 AM3/2/17
to SonarQube, stas...@gmail.com
Hello,
Issue was solved by changing Sonar version number in "Manage Jenkins" configuration.
Before we had Sonar plugin 2.3 and there was no need to set Sonar version in Jenkins configuration.
After upgrading Sonar plugin to version 2.5 this setting appear and was by default set to "5.3 or lower" and our Sonar version is 5.5

chitr...@gmail.com

unread,
May 24, 2017, 3:46:51 PM5/24/17
to SonarQube, stas...@gmail.com
Does this fix below worked?
I recently upgraded Sonar plugin to 2.5 and running Sonar instance on 5.6.6

Stas Roshkolets

unread,
May 24, 2017, 4:20:56 PM5/24/17
to SonarQube
Actually,
Changing Node configurations in Jenkins helped.
It was set to use java 1.7 instead of java 1.8 in "Advanced" section of Node/Slave settings.
Reply all
Reply to author
Forward
0 new messages