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

Publisher - Code Analysis - NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
    • Environment:
      - Static Code Analysis Plug-ins (id: analysis-core, wersja: 1.36)
      - Static Analysis Collector Plug-in 1.19
      - Jenkins 1.444

      Description

      Again in latest version there is a bug during publishing with analysis-core plugin.

      Cause:
      In section "Post-build Actions" of job configuration (type: maven), when "Publish combined analysis results" checked, the value of "Health priorities" (e.g. All priorities) is not remembered after save action (probably only in a form, no in stored a job configuration - there is ok).

      To reproduce (changes in job configuration):

      • check "Post-build Actions" -> "Publish combined analysis results"
      • use advanced settings and select "Health priorities" -> "All priorities"
      • use save action
      • build (should be BUILD SUCCESSFUL, config_correct.xml)
      • edit configuration again, there should be any value selected in path: "Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" (bug_analysis_core_nullpointerexception.jpg)
      • use save action
      • build (should be FAILURE, config_wrong.xml)

      ERROR: Publisher hudson.plugins.analysis.collector.AnalysisPublisher aborted due to exception
      java.lang.NullPointerException: Name is null
      at java.lang.Enum.valueOf(Enum.java:195)
      at hudson.plugins.analysis.util.model.Priority.valueOf(Priority.java:18)
      at hudson.plugins.analysis.core.HealthAwarePublisher.getMinimumPriority(HealthAwarePublisher.java:618)
      at hudson.plugins.analysis.core.AbstractHealthDescriptor.<init>(AbstractHealthDescriptor.java:36)
      at hudson.plugins.analysis.collector.AnalysisHealthDescriptor.<init>(AnalysisHealthDescriptor.java:25)
      at hudson.plugins.analysis.collector.AnalysisResultAction.<init>(AnalysisResultAction.java:31)
      at hudson.plugins.analysis.collector.AnalysisPublisher.perform(AnalysisPublisher.java:256)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:1014)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
      at hudson.model.Run.run(Run.java:1429)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

      1. config_correct.xml
        11 kB
        Marcin Drozdowski
      2. config_wrong.xml
        11 kB
        Marcin Drozdowski
      3. installed.html
        29 kB
        Marcin Drozdowski
      4. installed2.html
        26 kB
        Marcin Drozdowski
      1. bug_analysis_core_nullpointerexception.jpg
        43 kB
      2. bug_analysis_core_nullpointerexception.jpg
        42 kB

        Issue Links

          Activity

          Hide
          thinking Marcin Drozdowski added a comment -

          Disabled are those which have unchecked checkboxes in list (installed2.html). I'm afraid a lot of disabled plugins, and therefore a lot of combinations of plugins that may be in conflict.

          Show
          thinking Marcin Drozdowski added a comment - Disabled are those which have unchecked checkboxes in list (installed2.html). I'm afraid a lot of disabled plugins, and therefore a lot of combinations of plugins that may be in conflict.
          Show
          drulli Ulli Hafner added a comment - I think it is one of https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Any+Build+Step+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin
          Hide
          drulli Ulli Hafner added a comment -

          Can you please check if removing flexible-publisher and run-condition plug-in solves the problem? (Just to be sure which plugins cause the problems?)

          Show
          drulli Ulli Hafner added a comment - Can you please check if removing flexible-publisher and run-condition plug-in solves the problem? (Just to be sure which plugins cause the problems?)
          Hide
          thinking Marcin Drozdowski added a comment -

          I've made test again. I made it on new environment (just downloaded):
          1) jenkins.war (1.451)
          http://mirrors.jenkins-ci.org/war/latest/jenkins.war
          2) apache-tomcat-6.0.35.zip
          http://www.idg.pl/mirrors/apache/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.zip
          3) jdk-6u30-windows-i586.exe
          http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-windows-i586.exe

          Than I installed https://wiki.jenkins-ci.org/display/JENKINS/Analysis+Collector+Plugin (1.19), restart Jenkins and still everything was ok, but after install https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin (0.8) again the radio "Health priorities" (section: "Publish combined analysis results") wasn't checked. After uninstalling Flexible Publish Plugin everything back to normal, so for sure Flexible is causing problems.

          Thanks for help.

          Show
          thinking Marcin Drozdowski added a comment - I've made test again. I made it on new environment (just downloaded): 1) jenkins.war (1.451) http://mirrors.jenkins-ci.org/war/latest/jenkins.war 2) apache-tomcat-6.0.35.zip http://www.idg.pl/mirrors/apache/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.zip 3) jdk-6u30-windows-i586.exe http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-windows-i586.exe Than I installed https://wiki.jenkins-ci.org/display/JENKINS/Analysis+Collector+Plugin (1.19), restart Jenkins and still everything was ok, but after install https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin (0.8) again the radio "Health priorities" (section: "Publish combined analysis results") wasn't checked. After uninstalling Flexible Publish Plugin everything back to normal, so for sure Flexible is causing problems. Thanks for help.
          Hide
          drulli Ulli Hafner added a comment -

          Fixed in flexible-publisher plug-in, see JENKINS-12692.

          Show
          drulli Ulli Hafner added a comment - Fixed in flexible-publisher plug-in, see JENKINS-12692 .

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              thinking Marcin Drozdowski
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: