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

Flexible Publish NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Labels:
      None
    • Environment:
      CentOS 6.4
      Jenkins v1.534
      Plugin v0.12
    • Similar Issues:

      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

            Hide
            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.

            Show
            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.
            Hide
            chr0n1x Kevin R. added a comment -

            Hey ikedam,

            I'm using Chrome on Mac OSX.

            Show
            chr0n1x Kevin R. added a comment - Hey ikedam, I'm using Chrome on Mac OSX.
            Hide
            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.
            Show
            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.
            Hide
            ikedam ikedam added a comment -

            No more information to reproduce for a month...

            Show
            ikedam ikedam added a comment - No more information to reproduce for a month...
            Hide
            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.

            Show
            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.
            Hide
            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.

            Show
            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 .
            Hide
            jglick Jesse Glick added a comment -

            Reclosing accordingly.

            Show
            jglick Jesse Glick added a comment - Reclosing accordingly.
            Hide
            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.

            Show
            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

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

                Dates

                • Created:
                  Updated:
                  Resolved: