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

Jenkins-sonar-plugin throwing errors suddenly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: sonar-plugin
    • Labels:
    • Environment:
      Jenkins version: 1.594, java version: 1.7, soanr-maven-plugin version:2.7 (by default its latest)
    • Similar Issues:

      Description

      Jenkins build is throwing unexpected error like :

      07:01:45 [INFO] User cache: C:\Users\svc_enbuild\.sonar\cache
      07:01:45 [INFO] SonarQube version: null
      07:01:45 [INFO] ------------------------------------------------------------------------
      07:01:45 [INFO] BUILD FAILURE
      07:01:45 [INFO] ------------------------------------------------------------------------
      07:01:45 [INFO] Total time: 12.735s
      07:01:45 [INFO] Finished at: Mon Oct 26 07:01:45 PDT 2015
      07:01:45 [INFO] Final Memory: 30M/447M
      07:01:45 [INFO] ------------------------------------------------------------------------
      07:01:45 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7:sonar (default-cli) on project rrm-operational: null: MojoExecutionException: NullPointerException -> [Help 1]
      07:01:45 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7:sonar (default-cli) on project rrm-operational: null

      The day before its working fine. Build is using sonar-maven-plugin of version 2.7 (default). So looks like something changed in this particular version of jenkins sonar maven plugin.

      This blocks us to do a source code scan and code quality assessment.
      Please suggest here.

        Attachments

          Activity

          Hide
          feuchtcc Calla Feucht added a comment -

          There are a couple of posts on Stack Overflow about this already:

          The issue is in the code that comprises the sonar-maven-plugin version 2.7 (and it seems to still be present in version 2.7.1).

          The Jenkins-sonar-plugin default configuration uses the latest version of the sonar-maven-plugin available. You can hard-code the version of the sonar-maven-plugin used by the Jenkins-sonar-plugin to avoid this null pointer exception until the sonar-maven-plugin has been corrected.

          To hard-code the version of the sonar-maven-plugin used by the Jenkins-sonar-plugin, follow these steps:

          1. Navigate to your Jenkins instance
          2. Click "Mange Jenkins"
          3. Click "Configure System"
          4. Scroll to the portion of the page dedicated to configuration of your Sonar instances
          5. Click "Advanced..." in this configuration portion
          6. In the field "Version of sonar-maven-plugin," give the value 2.6
          7. Save your configuration
          Show
          feuchtcc Calla Feucht added a comment - There are a couple of posts on Stack Overflow about this already: http://stackoverflow.com/questions/33287641/sonar-maven-plugin-build-error-sonarqube-version-null http://stackoverflow.com/questions/33297230/jenkins-sonar-plugin-suddenly-stops-working The issue is in the code that comprises the sonar-maven-plugin version 2.7 (and it seems to still be present in version 2.7.1). The Jenkins-sonar-plugin default configuration uses the latest version of the sonar-maven-plugin available. You can hard-code the version of the sonar-maven-plugin used by the Jenkins-sonar-plugin to avoid this null pointer exception until the sonar-maven-plugin has been corrected. To hard-code the version of the sonar-maven-plugin used by the Jenkins-sonar-plugin, follow these steps: Navigate to your Jenkins instance Click "Mange Jenkins" Click "Configure System" Scroll to the portion of the page dedicated to configuration of your Sonar instances Click "Advanced..." in this configuration portion In the field "Version of sonar-maven-plugin," give the value 2.6 Save your configuration
          Hide
          ymartin1040 Yves Martin added a comment -

          Here is the registered issue for sonar-maven-plugin: https://jira.sonarsource.com/browse/MSONAR-131
          It should be fixed in next 2.8. Beware that Sonar 3 versions are no longer supported.

          Show
          ymartin1040 Yves Martin added a comment - Here is the registered issue for sonar-maven-plugin: https://jira.sonarsource.com/browse/MSONAR-131 It should be fixed in next 2.8. Beware that Sonar 3 versions are no longer supported.

            People

            Assignee:
            sonarteam Sonar Team
            Reporter:
            vikascdy vikas choudhary
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: