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

Flexible Publish NPE

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • None
    • CentOS 6.4
      Jenkins v1.534
      Plugin v0.12

    Description

      Setup:

      I have 3 conditonal steps post-build.

      StackTrace:

      ERROR: Publisher org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher aborted due to exception
      java.lang.NullPointerException
      at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:134)
      at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:111)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:786)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:758)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711)
      at hudson.model.Run.execute(Run.java:1690)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)

      Attachments

        Issue Links

          Activity

            ikedam ikedam added a comment -

            I could not reproduce the problem.
            I tested Jenkins1.534, Flexible Publish 0.12, IE10 and Firefox 24.0 on Windows7 64bits.

            It seems that configurations are not properly stored for the forms your browser sends are broken.
            Would you tell me what browser you use?

            As a workaround, you can restart Jenkins and the incomplete configurations will be automatically fixed.
            But reconfiguring jobs will break configurations again, I suppose.

            ikedam ikedam added a comment - I could not reproduce the problem. I tested Jenkins1.534, Flexible Publish 0.12, IE10 and Firefox 24.0 on Windows7 64bits. It seems that configurations are not properly stored for the forms your browser sends are broken. Would you tell me what browser you use? As a workaround, you can restart Jenkins and the incomplete configurations will be automatically fixed. But reconfiguring jobs will break configurations again, I suppose.
            chr0n1x Kevin R. added a comment -

            Hey ikedam,

            I'm using Chrome on Mac OSX.

            chr0n1x Kevin R. added a comment - Hey ikedam, I'm using Chrome on Mac OSX.
            ikedam ikedam added a comment -

            I failed to reproduce the problem even with chrome 30.0, Mac OSX 10.6.8...
            I want to see the smallest configuration to reproduce the problem in your
            environment.

            Would you try a followings?

            1. Create a new job with "Build a free-style software project"
            2. Add a build step "Execute shell" and run "touch test.txt"
            3. Add a post-build action "Flexible publish" and configure as followings:
              • Run?: Always (default)
              • Action: Archive the artifacts
              • Files to archive: test.txt
              • (No need to expand "Advanced" menus)
            4. Save the configuration, and run a build. Please see the problem occurs.
            5. Put the configuration XML file here. You can get it at ${JENKINS_HOME}/jobs/(job name)/config.xml. JENKINS_HOME is shown in "Home directory" in Manage Jenkins > Configure System.
            ikedam ikedam added a comment - I failed to reproduce the problem even with chrome 30.0, Mac OSX 10.6.8... I want to see the smallest configuration to reproduce the problem in your environment. Would you try a followings? Create a new job with "Build a free-style software project" Add a build step "Execute shell" and run "touch test.txt" Add a post-build action "Flexible publish" and configure as followings: Run?: Always (default) Action: Archive the artifacts Files to archive: test.txt (No need to expand "Advanced" menus) Save the configuration, and run a build. Please see the problem occurs. Put the configuration XML file here. You can get it at ${JENKINS_HOME}/jobs/(job name)/config.xml. JENKINS_HOME is shown in "Home directory" in Manage Jenkins > Configure System.
            ikedam ikedam added a comment -

            No more information to reproduce for a month...

            ikedam ikedam added a comment - No more information to reproduce for a month...

            Re-opening issue I have encountered this issue.

            Steps to reproduce:
            1. Create a new freestyle project
            2. Add the Flexible publish as a post build action.
            3. Save the project without any conditional publishers.
            4. It will throw an exception, however the save happens!
            5. Execute a build and it will throw the NPE.

            Another way you can get this NPE:
            1. Same steps as 1, 2, 3, 4.
            2. Restarting Jenkins throws this NPE, however the project will fail to load and show an error about project actions.
            c3eb1c protects against errors coming from jobs failing to load properly.

            I created PR 7 to fix this issue.

            schristou Steven Christou added a comment - Re-opening issue I have encountered this issue. Steps to reproduce: 1. Create a new freestyle project 2. Add the Flexible publish as a post build action. 3. Save the project without any conditional publishers. 4. It will throw an exception, however the save happens! 5. Execute a build and it will throw the NPE. Another way you can get this NPE: 1. Same steps as 1, 2, 3, 4. 2. Restarting Jenkins throws this NPE, however the project will fail to load and show an error about project actions. c3eb1c protects against errors coming from jobs failing to load properly. I created PR 7 to fix this issue.
            ikedam ikedam added a comment -

            Thanks for the report.
            That looks an issue introduced in 0.13, and generates another stracktrace reported in this issue.
            I created another issue in JENKINS-26452.

            ikedam ikedam added a comment - Thanks for the report. That looks an issue introduced in 0.13, and generates another stracktrace reported in this issue. I created another issue in JENKINS-26452 .
            jglick Jesse Glick added a comment -

            Reclosing accordingly.

            jglick Jesse Glick added a comment - Reclosing accordingly.

            Code changed in jenkins
            User: christ66
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
            src/test/java/org/jenkins_ci/plugins/flexible_publish/ConfigurationTest.java
            http://jenkins-ci.org/commit/flexible-publish-plugin/c0618c4a82313dbbe18abb4aba5373cf33c46085
            Log:
            JENKINS-19985 Prevent NPE and save if no publishers are added to the conditional step. This also prevents a NPE when the job loads.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java src/test/java/org/jenkins_ci/plugins/flexible_publish/ConfigurationTest.java http://jenkins-ci.org/commit/flexible-publish-plugin/c0618c4a82313dbbe18abb4aba5373cf33c46085 Log: JENKINS-19985 Prevent NPE and save if no publishers are added to the conditional step. This also prevents a NPE when the job loads.

            People

              ikedam ikedam
              chr0n1x Kevin R.
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: