• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Jenkins 2.72

      Within the current Jenkins, the upstrem-trigger mechanism fails with a NPE.

      To see the error, just create two "Pipeline" projects via Jenkins Web-UI:

      First is named "Kevin", the script is:

      pipeline {
      
        agent any
      
        stages {
          stage("Hello") {
            steps {
                script {
                    sh "echo Kevin here"
                }
            }
          }
        }
      
      }
      

      Starting this project works fine.

      Now, second project is named "Chantalle", the script is:

      pipeline {
      
        agent any
      
        triggers {
          upstream(
            threshold: hudson.model.Result.SUCCESS,
            upstreamProjects: "../Kevin"
          )
        }
      
        stages {
          stage("Hello") {
            steps {
                script {
                    sh "echo Chantalle here"
                }
            }
          }
        }
      
      }
      

      Similar, starting this project at its own works fine.

      But when starting "Kevin" again, I expect "Chantalle" to be executed afterwards. Instead, a NPE is thrown, and "Chantalle" does not start:

      Aug 01, 2017 1:39:38 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
      INFO: Kevin #6 completed: SUCCESS
      Aug 01, 2017 1:39:38 PM hudson.model.listeners.RunListener report
      WARNING: RunListener failed
      java.lang.NullPointerException
          at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
          at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
          at hudson.model.Items.fromNameList(Items.java:231)
          at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.calculateCache(ReverseBuildTrigger.java:256)
          at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:279)
          at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:663)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:134)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:966)
          at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1221)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
          at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
          at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
          at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      

          [JENKINS-45909] UpstreamTrigger fails with NPE

          Stefan Gasterstädt created issue -
          Stefan Gasterstädt made changes -
          Description Original: Within the current Jenkins, the upstrem-trigger mechanism fails with a NPE.

          To see the error, just create two "Pipeline" projects via Jenkins Web-UI:

          First is named "Kevin", the script is:
          {code:java}
          pipeline {

            agent any

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Kevin here"
                    }
                }
              }
            }

          }
          {code}

          Second is named "Chantalle", the script is:
          {code}
          pipeline {

            agent any

            triggers {
              upstream(
                threshold: hudson.model.Result.SUCCESS,
                upstreamProjects: "../Kevin"
              )
            }

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Chantalle here"
                    }
                }
              }
            }

          }
          {code}
          New: Within the current Jenkins, the upstrem-trigger mechanism fails with a NPE.

          To see the error, just create two "Pipeline" projects via Jenkins Web-UI:

          First is named "Kevin", the script is:
          {code:java}
          pipeline {

            agent any

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Kevin here"
                    }
                }
              }
            }

          }
          {code}

          Starting this project works fine.

          Now, second project is named "Chantalle", the script is:
          {code}
          pipeline {

            agent any

            triggers {
              upstream(
                threshold: hudson.model.Result.SUCCESS,
                upstreamProjects: "../Kevin"
              )
            }

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Chantalle here"
                    }
                }
              }
            }

          }
          {code}

          Again, starting this project works fine.

          But when starting "Kevin" again, I expect "Chantalle" to be executed afterwards. Instead, a NPE is thrown, and "Chantalle" does not start:

          {code}
          Aug 01, 2017 1:39:38 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
          INFO: Kevin #6 completed: SUCCESS
          Aug 01, 2017 1:39:38 PM hudson.model.listeners.RunListener report
          WARNING: RunListener failed
          java.lang.NullPointerException
              at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
              at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
              at hudson.model.Items.fromNameList(Items.java:231)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.calculateCache(ReverseBuildTrigger.java:256)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:279)
              at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:663)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:134)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:966)
              at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1221)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
          {code}
          Stefan Gasterstädt made changes -
          Description Original: Within the current Jenkins, the upstrem-trigger mechanism fails with a NPE.

          To see the error, just create two "Pipeline" projects via Jenkins Web-UI:

          First is named "Kevin", the script is:
          {code:java}
          pipeline {

            agent any

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Kevin here"
                    }
                }
              }
            }

          }
          {code}

          Starting this project works fine.

          Now, second project is named "Chantalle", the script is:
          {code}
          pipeline {

            agent any

            triggers {
              upstream(
                threshold: hudson.model.Result.SUCCESS,
                upstreamProjects: "../Kevin"
              )
            }

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Chantalle here"
                    }
                }
              }
            }

          }
          {code}

          Again, starting this project works fine.

          But when starting "Kevin" again, I expect "Chantalle" to be executed afterwards. Instead, a NPE is thrown, and "Chantalle" does not start:

          {code}
          Aug 01, 2017 1:39:38 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
          INFO: Kevin #6 completed: SUCCESS
          Aug 01, 2017 1:39:38 PM hudson.model.listeners.RunListener report
          WARNING: RunListener failed
          java.lang.NullPointerException
              at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
              at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
              at hudson.model.Items.fromNameList(Items.java:231)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.calculateCache(ReverseBuildTrigger.java:256)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:279)
              at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:663)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:134)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:966)
              at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1221)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
          {code}
          New: Within the current Jenkins, the upstrem-trigger mechanism fails with a NPE.

          To see the error, just create two "Pipeline" projects via Jenkins Web-UI:

          First is named "Kevin", the script is:
          {code:java}
          pipeline {

            agent any

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Kevin here"
                    }
                }
              }
            }

          }
          {code}

          Starting this project works fine.

          Now, second project is named "Chantalle", the script is:
          {code}
          pipeline {

            agent any

            triggers {
              upstream(
                threshold: hudson.model.Result.SUCCESS,
                upstreamProjects: "../Kevin"
              )
            }

            stages {
              stage("Hello") {
                steps {
                    script {
                        sh "echo Chantalle here"
                    }
                }
              }
            }

          }
          {code}

          Similar, starting this project at its own works fine.

          But when starting "Kevin" again, I expect "Chantalle" to be executed afterwards. Instead, a NPE is thrown, and "Chantalle" does not start:

          {code}
          Aug 01, 2017 1:39:38 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
          INFO: Kevin #6 completed: SUCCESS
          Aug 01, 2017 1:39:38 PM hudson.model.listeners.RunListener report
          WARNING: RunListener failed
          java.lang.NullPointerException
              at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
              at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
              at hudson.model.Items.fromNameList(Items.java:231)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.calculateCache(ReverseBuildTrigger.java:256)
              at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:279)
              at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:663)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:134)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:966)
              at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1221)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
          {code}
          Stefan Gasterstädt made changes -
          Component/s New: pipeline-model-definition-plugin [ 21706 ]
          Andrew Bayer made changes -
          Assignee New: Andrew Bayer [ abayer ]
          Sir Tumbleweed made changes -
          Attachment New: Chantalle_config.xml [ 39146 ]
          Attachment New: Kevin_config.xml [ 39147 ]
          Andrew Bayer made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: pipeline-model-definition-plugin [ 21706 ]
          Component/s Original: workflow-job-plugin [ 21716 ]
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #2966 (Web Link)" [ 17411 ]
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            abayer Andrew Bayer
            ghostcity Stefan Gasterstädt
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: