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

Publisher - Code Analysis - NullPointerException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • 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
    • Similar Issues:

      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)

        Attachments

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

          Issue Links

            Activity

            thinking Marcin Drozdowski created issue -
            thinking Marcin Drozdowski made changes -
            Field Original Value New Value
            Labels jenkins plugin
            Attachment bug_analysis_core_nullpointerexception.jpg [ 21343 ]
            Attachment config_correct.xml [ 21344 ]
            Attachment config_wrong.xml [ 21345 ]
            Affects Version/s current [ 10162 ]
            Environment - Static Code Analysis Plug-ins (id: analysis-core, wersja: 1.36)
            - 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 (shoud be BUILD SUCCESSFUL, config_correct.xml)
               - edit configuration again, there shoud be any value selected in path: "Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" (bug_analysis_core_nullpointerexception.jpg)
               - use save action
               - build (shoud 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)
            thinking Marcin Drozdowski made changes -
            thinking Marcin Drozdowski made changes -
            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 (shoud be BUILD SUCCESSFUL, config_correct.xml)
               - edit configuration again, there shoud be any value selected in path: "Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" (bug_analysis_core_nullpointerexception.jpg)
               - use save action
               - build (shoud 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)
            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)
            Hide
            drulli Ulli Hafner added a comment -

            Which version of analysis-collector are you using? Are you using the template-project plug-in?

            Show
            drulli Ulli Hafner added a comment - Which version of analysis-collector are you using? Are you using the template-project plug-in?
            Hide
            thinking Marcin Drozdowski added a comment -

            Static Analysis Collector Plug-in 1.19 and none Template Project Plugin

            Show
            thinking Marcin Drozdowski added a comment - Static Analysis Collector Plug-in 1.19 and none Template Project Plugin
            thinking Marcin Drozdowski made changes -
            Environment - Static Code Analysis Plug-ins (id: analysis-core, wersja: 1.36)
            - Jenkins 1.444
            - Static Code Analysis Plug-ins (id: analysis-core, wersja: 1.36)
            - Static Analysis Collector Plug-in 1.19
            - Jenkins 1.444
            Hide
            drulli Ulli Hafner added a comment -

            Can you please attach the versions of all your plug-ins? There seems to be an interaction with another plug-in. Seems that one of the values in the XML file is removed (config_wrong.xml).

            Show
            drulli Ulli Hafner added a comment - Can you please attach the versions of all your plug-ins? There seems to be an interaction with another plug-in. Seems that one of the values in the XML file is removed (config_wrong.xml).
            Hide
            drulli Ulli Hafner added a comment -

            Did you try on a clean Jenkins installation with only the analysis plugins installed?

            Show
            drulli Ulli Hafner added a comment - Did you try on a clean Jenkins installation with only the analysis plugins installed?
            drulli Ulli Hafner made changes -
            Link This issue is related to JENKINS-8185 [ JENKINS-8185 ]
            Hide
            thinking Marcin Drozdowski added a comment -

            I attached list of installed plugins (installed.html).
            Unfortunately I didn't try with clean installation.

            Show
            thinking Marcin Drozdowski added a comment - I attached list of installed plugins (installed.html). Unfortunately I didn't try with clean installation.
            thinking Marcin Drozdowski made changes -
            Attachment installed.html [ 21347 ]
            Hide
            drulli Ulli Hafner added a comment -

            Ok thanks, looks pretty normal to me.

            I'm not sure if I understand the steps to reproduce. Is the radio button filled initially?
            I.e., if you create a new job and activate the publisher, is the radio button filled? When you then press save is the <thresholdLimit>low</thresholdLimit> tag present in the config.xml file? When exactly is the tag removed?

            Is this for all of your jobs? Did that work before?

            Show
            drulli Ulli Hafner added a comment - Ok thanks, looks pretty normal to me. I'm not sure if I understand the steps to reproduce. Is the radio button filled initially? I.e., if you create a new job and activate the publisher, is the radio button filled? When you then press save is the <thresholdLimit>low</thresholdLimit> tag present in the config.xml file? When exactly is the tag removed? Is this for all of your jobs? Did that work before?
            thinking Marcin Drozdowski made changes -
            Attachment installed2.html [ 21357 ]
            Hide
            thinking Marcin Drozdowski added a comment -

            I've made some tests, results:

            • on all new/old jobs type "Build multi-configuration project" problem doesn't exist
            • on all new (I don't have any old) jobs type "Build a maven2/3 project" problem exists in path: Post-build Actions" -> "Publish combined analysis results" -> "Health priorities"
            • on all new (I don't have any old) jobs type "Build a free-style software project" problem exists in path: "Post-build Actions" -> "Publish FindBugs analysis results" -> "Health priorities"

            Now we found the solution, but unfortunately not cause. To fix the problem we analyze the list of plugins and disable a few (new list attached above), so I think you're right that cause of problem is a conflict between plugins.

            Show
            thinking Marcin Drozdowski added a comment - I've made some tests, results: on all new/old jobs type "Build multi-configuration project" problem doesn't exist on all new (I don't have any old) jobs type "Build a maven2/3 project" problem exists in path: Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" on all new (I don't have any old) jobs type "Build a free-style software project" problem exists in path: "Post-build Actions" -> "Publish FindBugs analysis results" -> "Health priorities" Now we found the solution, but unfortunately not cause. To fix the problem we analyze the list of plugins and disable a few (new list attached above), so I think you're right that cause of problem is a conflict between plugins.
            Hide
            thinking Marcin Drozdowski added a comment - - edited

            I've made some tests, results:

            • on all new/old jobs type "Build multi-configuration project" problem doesn't exist
            • on all new (I don't have any old) jobs type "Build a maven2/3 project" problem exists in path: Post-build Actions" -> "Publish combined analysis results" -> "Health priorities"
            • on all new (I don't have any old) jobs type "Build a free-style software project" problem exists in path: "Post-build Actions" -> "Publish FindBugs analysis results" -> "Health priorities"

            Now we found the solution, but unfortunately not cause. To fix the problem we analyze the list of plugins and disable a few (new list attached above, installed2.html), so I think you're right that cause of problem is a conflict between plugins.

            Show
            thinking Marcin Drozdowski added a comment - - edited I've made some tests, results: on all new/old jobs type "Build multi-configuration project" problem doesn't exist on all new (I don't have any old) jobs type "Build a maven2/3 project" problem exists in path: Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" on all new (I don't have any old) jobs type "Build a free-style software project" problem exists in path: "Post-build Actions" -> "Publish FindBugs analysis results" -> "Health priorities" Now we found the solution, but unfortunately not cause. To fix the problem we analyze the list of plugins and disable a few (new list attached above, installed2.html), so I think you're right that cause of problem is a conflict between plugins.
            Hide
            drulli Ulli Hafner added a comment -

            But which one did you disable? Mayne I can have a look at these...

            Show
            drulli Ulli Hafner added a comment - But which one did you disable? Mayne I can have a look at these...
            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
            drulli Ulli Hafner made changes -
            Link This issue is related to JENKINS-12692 [ JENKINS-12692 ]
            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 .
            drulli Ulli Hafner made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142504 ] JNJira + In-Review [ 190137 ]

              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: