-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.291
Pipeline: Groovy 2.94
when rebuild there was NullPointerException
Started by upstream project "bf_20" build number 247
originally caused by:
Started by user unknown or anonymous
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:65)
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:73)
at hudson.model.Cause$UpstreamCause.print(Cause.java:322)
at hudson.model.Cause$UpstreamCause.print(Cause.java:298)
at hudson.model.BuildListener.started(BuildListener.java:49)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:289)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
public @CheckForNull Run<?,?> getOriginal() { return run.getParent().getBuildByNumber(originalNumber); // this line throw NullPointerException, the "run" variable is null. }
the build history see this picture.
below is build #1 CauseAction
<hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UpstreamCause> <upstreamProject>bf_20</upstreamProject> <upstreamUrl>job/bf_20/</upstreamUrl> <upstreamBuild>247</upstreamBuild> <upstreamCauses> <hudson.model.Cause_-UserIdCause> <userId>bright</userId> </hudson.model.Cause_-UserIdCause> <org.jenkinsci.plugins.workflow.cps.replay.ReplayCause plugin="workflow-cps@2.94"> <originalNumber>246</originalNumber> </org.jenkinsci.plugins.workflow.cps.replay.ReplayCause> </upstreamCauses> </hudson.model.Cause_-UpstreamCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction>
below is build #16 CauseAction
<hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UpstreamCause> <upstreamProject>bf_20</upstreamProject> <upstreamUrl>job/bf_20/</upstreamUrl> <upstreamBuild>247</upstreamBuild> <upstreamCauses> <hudson.model.Cause_-UserIdCause> <userId>bright.ma</userId> </hudson.model.Cause_-UserIdCause> <org.jenkinsci.plugins.workflow.cps.replay.ReplayCause plugin="workflow-cps@2.90"> <originalNumber>246</originalNumber> </org.jenkinsci.plugins.workflow.cps.replay.ReplayCause> </upstreamCauses> </hudson.model.Cause_-UpstreamCause> <int>1</int> </entry> <entry> <hudson.model.Cause_-UserIdCause> <userId>bright.ma</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> <entry> <com.sonyericsson.rebuild.RebuildCause plugin="rebuild@1.32"> <upstreamProject>buildfarm_rmsh_01</upstreamProject> <upstreamUrl>view/buildfarm/job/buildfarm_rmsh_01/</upstreamUrl> <upstreamBuild>1</upstreamBuild> <upstreamCauses> <hudson.model.Cause_-UpstreamCause> <upstreamProject>bf_20</upstreamProject> <upstreamUrl>job/bf_20/</upstreamUrl> <upstreamBuild>247</upstreamBuild> <upstreamCauses> <hudson.model.Cause_-UserIdCause reference="../../../../../../entry/hudson.model.Cause_-UpstreamCause/upstreamCauses/hudson.model.Cause_-UserIdCause"/> <org.jenkinsci.plugins.workflow.cps.replay.ReplayCause reference="../../../../../../entry/hudson.model.Cause_-UpstreamCause/upstreamCauses/org.jenkinsci.plugins.workflow.cps.replay.ReplayCause"/> </upstreamCauses> </hudson.model.Cause_-UpstreamCause> </upstreamCauses> </com.sonyericsson.rebuild.RebuildCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction>