Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39649

Unable to install sonarqube plugin in Jenkins Versions 2.19.2 & 2.30

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: sonar-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      The Below Output is for Sonarqube Plugin Installation Failure for Jenkins 2.19.2

      Failure -
       
      java.io.IOException: Failed to dynamically deploy this plugin
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1883)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1640)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: Failed to install sonar plugin
          at hudson.PluginManager.dynamicLoad(PluginManager.java:873)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:813)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1879)
          ... 5 more
      Caused by: java.io.IOException: Unable to load hudson.plugins.sonar.SonarPlugin from sonar
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:514)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:864)
          ... 7 more
      Caused by: java.lang.UnsupportedClassVersionError: hudson/plugins/sonar/SonarPlugin : Unsupported major.minor version 52.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
          at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
          at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:885)
          at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
          at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1363)
          at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
          at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:507)
          ... 8 more
      

      The Below Output is for Sonarqube Plugin Installation Failure for Jenkins 2.30

         
      Failure -
       
      java.io.IOException: Failed to dynamically deploy this plugin
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1895)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1652)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: Failed to install sonar plugin
          at hudson.PluginManager.dynamicLoad(PluginManager.java:873)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:813)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1891)
          ... 5 more
      Caused by: java.io.IOException: Unable to load hudson.plugins.sonar.SonarPlugin from sonar
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:508)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:864)
          ... 7 more
      Caused by: java.lang.UnsupportedClassVersionError: hudson/plugins/sonar/SonarPlugin : Unsupported major.minor version 52.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
          at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
          at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:876)
          at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
          at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1363)
          at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
          at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:501)
          ... 8 more
      

        Attachments

          Activity

          Hide
          rtyler R. Tyler Croy added a comment -

          It looks like the plugin was built for JRE8 and the Jenkins master is running JRE7.

          In the future please file tickets for Jenkins in the JENKINS project, INFRA is used only for our project's infrastructure.

          Show
          rtyler R. Tyler Croy added a comment - It looks like the plugin was built for JRE8 and the Jenkins master is running JRE7. In the future please file tickets for Jenkins in the JENKINS project, INFRA is used only for our project's infrastructure.
          Show
          batmat Baptiste Mathus added a comment - Fixed, see https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/jenkinsci-users/5W-NemTKGpw/WDiAsX_LBgAJ
          Hide
          zen_pwning karthik vee added a comment - - edited

          Well the link you shared points to the post I made

          If thats a fix, it should be mentioned that JDK8 or JRE8 as prerequisite for installing Latest Versions of Jenkins [2.19.2 & 2.30].
          Isn't it so?

          Show
          zen_pwning karthik vee added a comment - - edited Well the link you shared points to the post I made If thats a fix, it should be mentioned that JDK8 or JRE8 as prerequisite for installing Latest Versions of Jenkins [2.19.2 & 2.30] . Isn't it so?
          Hide
          batmat Baptiste Mathus added a comment -

          Right, maybe you should reopen indeed.

          For your question, actually no. It's not a matter of Jenkins, the Jenkins version is unrelated, as Tyler already told you, it's probably only the SonarQube plugin that got compiled with and for JRE8.

          Jenkins itself is definitely not requiring Java 8 yet (but will most probably very soon).

          Show
          batmat Baptiste Mathus added a comment - Right, maybe you should reopen indeed. For your question, actually no. It's not a matter of Jenkins, the Jenkins version is unrelated, as Tyler already told you, it's probably only the SonarQube plugin that got compiled with and for JRE8. Jenkins itself is definitely not requiring Java 8 yet (but will most probably very soon).
          Hide
          zen_pwning karthik vee added a comment - - edited

          The sonar-qube plugin installation for jenkins works properly in latest installations [2.30 etc] only when JDK8 or JRE8 are installed in Jenkins Server. So by default just the Jenkins 2.30, 2.19.2 installations alone without JDK8 or JRE8 doesn't support Sonar-qube plugin, this is the that issue needs to be fixed in my view. As suggested by Baptiste Mathus I'm reopening the issue.

          Show
          zen_pwning karthik vee added a comment - - edited The sonar-qube plugin installation for jenkins works properly in latest installations [2.30 etc] only when JDK8 or JRE8 are installed in Jenkins Server. So by default just the Jenkins 2.30, 2.19.2 installations alone without JDK8 or JRE8 doesn't support Sonar-qube plugin, this is the that issue needs to be fixed in my view. As suggested by Baptiste Mathus I'm reopening the issue.
          Hide
          batmat Baptiste Mathus added a comment -

          Note that there's no hard rule for plugins to respect the Jenkins' core JDK baseline (JDK7, as of today, for probably still a few weeks/months).
          Hence, here, it's perfectly possible, though unfortunate, that the SonarQube Jenkins Plugin developers consciously decided to only support Java 8.

          One of the biggest issues here is that there's currently no way inside Jenkins' plugins manager to warn a user about that before installing a plugin. And this is JENKINS-20679

          Show
          batmat Baptiste Mathus added a comment - Note that there's no hard rule for plugins to respect the Jenkins' core JDK baseline (JDK7, as of today, for probably still a few weeks/months). Hence, here, it's perfectly possible, though unfortunate, that the SonarQube Jenkins Plugin developers consciously decided to only support Java 8. One of the biggest issues here is that there's currently no way inside Jenkins' plugins manager to warn a user about that before installing a plugin. And this is JENKINS-20679
          Hide
          henryju Julien HENRY added a comment -

          As mentioned the reason is that all SonarSource products moved to JDK 8 few months ago. There is no way we can maintain a JDK 7 compatible version of the Jenkins plugin (because of many transitive dependencies on other components).

          Show
          henryju Julien HENRY added a comment - As mentioned the reason is that all SonarSource products moved to JDK 8 few months ago. There is no way we can maintain a JDK 7 compatible version of the Jenkins plugin (because of many transitive dependencies on other components).

            People

            Assignee:
            sonarteam Sonar Team
            Reporter:
            zen_pwning karthik vee
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: