-
Bug
-
Resolution: Fixed
-
Major
-
None
-
MKS Integrity 2009 SP5 - Windows 2008 R2
Jenkins v1.512
The first time "poll SCM" is executed, it fails because of a java.lang.NullPointerException
[JENKINS-21479] Poll SCM trigger no functioning during the first execution
Description |
Original:
The integrity plugin doesn't detect any changes since the last checkpoint: Started on Jan 22, 2014 4:39:21 PM Preparing to execute si projectinfo for #/Projects/MyProject#Core/MySubProject#d=MYDEVPATH_7.2 Preparing to execute si viewproject for #/Projects/MyProject#Core/MySubProject#d=MYDEVPATH_7.2 No new changes detected in project! Done. Took 8 sec No changes However, there were changes and I could list them manually using "si mods". The Poll SCM trigger works fine with mainline projects. The issue showed up when we created a development path. |
New: The first time "poll SCM" is executed, it fails because of a java.lang.NullPointerException |
Summary | Original: Poll SCM trigger no functioning with variant projects | New: Poll SCM trigger no functioning during the first execution |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 153345 ] | New: JNJira + In-Review [ 194554 ] |
I reviewed the source code of the plugin and it seems like the projects map is initialized the first time getIntegrityProject() is called by compareRemoteRevisionWith. As a consequence, siProject is set to null and there is an exception thrown:
java.lang.NullPointerException
at hudson.scm.IntegritySCM.compareRemoteRevisionWith(IntegritySCM.java:939)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)
at hudson.model.AbstractProject._poll(AbstractProject.java:1585)
at hudson.model.AbstractProject.poll(AbstractProject.java:1494)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:462)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:491)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)