java.lang.NullPointerException: project is null,

Jenkins JIRA | Rainer Burgstaller | 4 years ago
  1. 0

    I have a matrix based security setup where "authenticated" can do everything and anonymous can do nothing. In addition, I am using the template-project-plugin. In such a configuration polling the SCM will fail due to Hudson.getItem() returning {{null}}. The reason for that is that the authentication of the {{SCMTrigger.run}} method is null and therefore, jenkins assumes that this user is unauthenticated (anonymous) and therefore, does not have any permissions whatsoever. {noformat} ERROR: Failed to record SCM polling for java.lang.NullPointerException: project is null, at hudson.plugins.templateproject.ProxySCM.requiresWorkspaceForPolling(ProxySCM.java:179) at hudson.model.AbstractProject._poll(AbstractProject.java:1417) at hudson.model.AbstractProject.poll(AbstractProject.java:1387) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) 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) at java.lang.Thread.run(Unknown Source) {noformat} Whether this is a bug in ProxySCM (and therefore the template plugin) or whether this is a general problem is hard for me to tell. I was able to work around the problem by giving "Job/read" permission to "anonymous" but IMHO the SCMTrigger should run as SYSTEM.

    Jenkins JIRA | 4 years ago | Rainer Burgstaller
    java.lang.NullPointerException: project is null,
  2. 0

    I have a matrix based security setup where "authenticated" can do everything and anonymous can do nothing. In addition, I am using the template-project-plugin. In such a configuration polling the SCM will fail due to Hudson.getItem() returning {{null}}. The reason for that is that the authentication of the {{SCMTrigger.run}} method is null and therefore, jenkins assumes that this user is unauthenticated (anonymous) and therefore, does not have any permissions whatsoever. {noformat} ERROR: Failed to record SCM polling for java.lang.NullPointerException: project is null, at hudson.plugins.templateproject.ProxySCM.requiresWorkspaceForPolling(ProxySCM.java:179) at hudson.model.AbstractProject._poll(AbstractProject.java:1417) at hudson.model.AbstractProject.poll(AbstractProject.java:1387) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) 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) at java.lang.Thread.run(Unknown Source) {noformat} Whether this is a bug in ProxySCM (and therefore the template plugin) or whether this is a general problem is hard for me to tell. I was able to work around the problem by giving "Job/read" permission to "anonymous" but IMHO the SCMTrigger should run as SYSTEM.

    Jenkins JIRA | 4 years ago | Rainer Burgstaller
    java.lang.NullPointerException: project is null,
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Batch task fails!

    Google Groups | 5 years ago | Jan Seidel
    java.lang.NullPointerException: Current Project is null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      project is null,

      at hudson.plugins.templateproject.ProxySCM.requiresWorkspaceForPolling()
    2. hudson.plugins.templateproject
      ProxySCM.requiresWorkspaceForPolling
      1. hudson.plugins.templateproject.ProxySCM.requiresWorkspaceForPolling(ProxySCM.java:179)
      1 frame
    3. Hudson
      SequentialExecutionQueue$QueueEntry.run
      1. hudson.model.AbstractProject._poll(AbstractProject.java:1417)
      2. hudson.model.AbstractProject.poll(AbstractProject.java:1387)
      3. hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420)
      4. hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449)
      5. hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      5 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      3. java.util.concurrent.FutureTask.run(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      6. java.lang.Thread.run(Unknown Source)
      6 frames