Reverse Build Trigger: NullPointerException

167 views
Skip to first unread message

Sverre Moe

unread,
Aug 28, 2015, 6:54:11 AM8/28/15
to Jenkins Users
Using Jenkins 1.626

I have configured 19 projects with a reverse build trigger "Build after other projects are built".
After building the upstream project, these 19 projects (minus those disabled) should be triggered as well.
I have rechecked the configuration for every downstream projects. They look fine. I have even re-saved all those projects.
My projects are all multi-configuration jobs.

Still I am getting a NullPointerException for one of the downstream projects:

Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Triggering a new build of project2
project3
is disabled. Triggering skipped
project4
is disabled. Triggering skipped
Triggering a new build of project5
Triggering a new build of project6
Triggering a new build of project7
Triggering a new build of project8
FATAL
: null
java.lang.NullPointerException
        at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111)
        at
jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84)
        at
jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141)
        at
hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245)
        at
hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687)
        at
hudson.model.Run.execute(Run.java:1788)
        at
hudson.matrix.MatrixBuild.run(MatrixBuild.java:301)
        at
hudson.model.ResourceController.execute(ResourceController.java:98)
        at
hudson.model.Executor.run(Executor.java:381)
Finished: SUCCESS

It is impossible to find out which project it has a problem with, among the total 19 downstream projects.

There are many reported bugs on this matter, most Closed and resolved:
https://issues.jenkins-ci.org/browse/JENKINS-23191
https://issues.jenkins-ci.org/browse/JENKINS-25758
https://issues.jenkins-ci.org/browse/JENKINS-23686


The configuration for alle downstream projects look the same
    <jenkins.triggers.ReverseBuildTrigger>
     
<spec></spec>
     
<upstreamProjects>project1</upstreamProjects>
     
<threshold>
       
<name>SUCCESS</name>
       
<ordinal>0</ordinal>
       
<color>BLUE</color>
       
<completeBuild>true</completeBuild>
     
</threshold>
   
</jenkins.triggers.ReverseBuildTrigger>



I have even tried restarting Jenkins, but that didn't work.

Sverre Moe

unread,
Aug 28, 2015, 9:17:05 AM8/28/15
to Jenkins Users
I have taken a look into the code of ReverseBuildTrigger where the NullPointerException happens:
111 boolean downstreamVisible = jenkins.getItemByFullName(job.getFullName()) == job;

But still no closer to the solution...

It looks like the problem lies with authentication.

Sverre Moe

unread,
Aug 28, 2015, 9:25:23 AM8/28/15
to Jenkins Users
I had 3 downstream projects which was disabled. Two of them caused no trouble, because it just skipped them
project3 is disabled. Triggering skipped
When I removed the upstream project from each disabled downstream projects reverse build trigger, then everything worked fine.

fredag 28. august 2015 12.54.11 UTC+2 skrev Sverre Moe følgende:

Sverre Moe

unread,
Sep 1, 2015, 3:06:33 AM9/1/15
to Jenkins Users
I don't understand what the problem is, but it is happening again, and none of the projects are disabled this time.

Sverre Moe

unread,
Sep 1, 2015, 4:17:48 AM9/1/15
to Jenkins Users
I found an active bug report that is relevant for my problem
Reply all
Reply to author
Forward
0 new messages