jenkinsci / jenkinsci/gerrit-trigger-plugin
[JENKINS-27438] Gerrit Trigger NPE causes folder not to load
- Dominant language
- Java
- Stars
- 226
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
Folder containing jobs disappeared. I tried reloading the config from the filesystem option and I still see the same error message. Other team folders are visible and working correctly. Gerrit trigger functionality seems to work as well. I can hit the query and trigger Gerrit Patches link and it works fine.
I see in the logs:
```
Mar 16, 2015 12:35:20 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading job team_xyz
java.lang.NullPointerException
at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.start(GerritTrigger.java:396)
at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.start(GerritTrigger.java:124)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:325)
at hudson.model.Project.onLoad(Project.java:95)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at jenkins.model.Jenkins$17.run(Jenkins.java:2656)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:886)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
```
---
Originally reported by stuff4ben, imported from: Gerrit Trigger NPE causes folder not to load
rsandell
Raw content of original issue
Folder containing jobs disappeared. I tried reloading the config from the filesystem option and I still see the same error message. Other team folders are visible and working correctly. Gerrit trigger functionality seems to work as well. I can hit the query and trigger Gerrit Patches link and it works fine.
I see in the logs:
Mar 16, 2015 12:35:20 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading job team_xyz
java.lang.NullPointerException
at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.start(GerritTrigger.java:396)
at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.start(GerritTrigger.java:124)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:325)
at hudson.model.Project.onLoad(Project.java:95)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:108)
at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239)
at hudson.model.Items.load(Items.java:279)
at jenkins.model.Jenkins$17.run(Jenkins.java:2656)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:886)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
environment
```
Jenkins LTS 1.580.3 (installed standalone using builtin web container)
Cloudbees enterprise plugins installed
Linux RHEL 6.5
Java version "1.7.0_76"
Gerrit Trigger Plugin 2.12.0
```
Contributor guide
Research direction
Start in GerritTrigger.start at GerritTrigger.java:396, using the reported folder-loading stack trace and the Jenkins 1.580.3/Gerrit Trigger Plugin 2.12.0 environment as context. Reproduce loading a folder containing the affected job and verify that the folder remains visible without the NullPointerException while Gerrit trigger functionality continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100