[JIRA] (JENKINS-39044) NPE thrown when firing upstream jobs

2 views
Skip to first unread message

jenkins@vampyred.net (JIRA)

unread,
Oct 17, 2016, 2:33:01 PM10/17/16
to jenkinsc...@googlegroups.com
Mike Delaney created an issue
 
Jenkins / Bug JENKINS-39044
NPE thrown when firing upstream jobs
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: sample-classic.xml, sample-pipeline.xml
Components: core
Created: 2016/Oct/17 6:32 PM
Environment: Jenkins: 2.25
Java: 1.8.0_72
Priority: Major Major
Reporter: Mike Delaney

I've run into an issue where, when trying to trigger a pipeline job from a freestyle (classic), I'm seeing a NPE in the jenkins log. This happens when the pipeline job is an upstream of a freestyle job; and trying to watch for new builds of the freestyle.

The full stack trace is:

WARNING: RunListener failed
java.lang.NullPointerException
        at hudson.model.Result.isBetterOrEqualTo(Result.java:130)
        at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:139)
        at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:89)
        at jenkins.triggers.ReverseBuildTrigger$RunListenerImpl.onCompleted(ReverseBuildTrigger.java:258)
        at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:214)
        at hudson.model.Run.execute(Run.java:1765)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:401)

This is preventing the upstream job from getting triggered.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 10, 2016, 4:31:01 PM11/10/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 10, 2016, 4:32:01 PM11/10/16
to jenkinsc...@googlegroups.com
Oleg Nenashev edited a comment on Bug JENKINS-39044
It is a bug in the ReverseBuildTrigger plugin. Jenkins API explicitly prohibits passing null: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Result.java#L129-L131 . Hence there is a bug in the core

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 10, 2016, 4:35:04 PM11/10/16
to jenkinsc...@googlegroups.com

On the other hand, https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java#L139 assumes that threshold is somehow not specified in your job

Please provide your job configuration. Do you also use any Job Generators to create such config?

jenkins@vampyred.net (JIRA)

unread,
Nov 12, 2016, 6:10:01 PM11/12/16
to jenkinsc...@googlegroups.com

The attached files sample-classic.xml and sample-pipeline.xml cause the N.P.E. I do not have generators, I created these by hand.

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 2, 2017, 2:04:04 PM3/2/17
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
 
Change By: Oleg Nenashev
Labels: newbie-friendly
Reply all
Reply to author
Forward
0 new messages