[JIRA] (JENKINS-55214) NullPointerException when starting a pipeline in a multibranch project

9 views
Skip to first unread message

gaspard.petit@eidosmontreal.com (JIRA)

unread,
Dec 16, 2018, 12:39:02 AM12/16/18
to jenkinsc...@googlegroups.com
Gaspard Petit created an issue
 
Jenkins / Bug JENKINS-55214
NullPointerException when starting a pipeline in a multibranch project
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2018-12-16 05:38
Priority: Blocker Blocker
Reporter: Gaspard Petit

java.lang.NullPointerException
at org.jenkinsci.plugins.p4.scm.StreamsScmSource.getWorkspace(StreamsScmSource.java:67)
at org.jenkinsci.plugins.p4.PerforceScm.<init>(PerforceScm.java:190)
at org.jenkinsci.plugins.p4.scm.P4SCMHead.getScm(P4SCMHead.java:34)
at org.jenkinsci.plugins.p4.scm.P4SCMBuilder.build(P4SCMBuilder.java:55)
at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.build(AbstractP4ScmSource.java:193)
at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.build(AbstractP4ScmSource.java:47)
at jenkins.scm.api.SCMFileSystem$Builder.build(SCMFileSystem.java:546)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:303)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:100)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
 
After updating to 1.9.5 and launching a build (any). Building works fine after reverting to 1.8.15 - which is the last version of the P4 plugin that has worked for us.
 
 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

gaspard.petit@eidosmontreal.com (JIRA)

unread,
Dec 16, 2018, 12:40:01 AM12/16/18
to jenkinsc...@googlegroups.com
Gaspard Petit updated an issue
Change By: Gaspard Petit
{code: java }
java
.lang.NullPointerException

at org.jenkinsci.plugins.p4.scm.StreamsScmSource.getWorkspace(StreamsScmSource.java:67)
at org.jenkinsci.plugins.p4.PerforceScm.<init>(PerforceScm.java:190)
at org.jenkinsci.plugins.p4.scm.P4SCMHead.getScm(P4SCMHead.java:34)
at org.jenkinsci.plugins.p4.scm.P4SCMBuilder.build(P4SCMBuilder.java:55)
at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.build(AbstractP4ScmSource.java:193)
at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.build(AbstractP4ScmSource.java:47)
at jenkins.scm.api.SCMFileSystem$Builder.build(SCMFileSystem.java:546)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:303)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:100)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE {code}

 
After updating to 1.9.5 and launching a build (any). Building works fine after reverting to 1.8.15 - which is the last version of the P4 plugin that has worked for us.
 
 

pallen@perforce.com (JIRA)

unread,
Dec 17, 2018, 5:46:02 AM12/17/18
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-55214
 
Re: NullPointerException when starting a pipeline in a multibranch project

It seems that the Path is invalid? I didn't think that was possible...

Please can you provide some detail to help us reproduce the issue.
(1) I presume you are using 'Helix Streams' for the source?
(2) Do you use a custom name or location for your Jenkinsfile
(3) Is your Jenkinsfile 'Pipeline' (Declarative) or 'node' (Script)?
(4) Do you use Libraries
(5) Do you use 'p4sync' or 'checkout' steps in the Jenkinsfile
(6) When referring to 'Starting a pipeline in a MultiBranch project' do you simply mean clicking on 'Scan Multibranch Pipeline Now' or some other feature?

pallen@perforce.com (JIRA)

unread,
Dec 17, 2018, 5:51:02 AM12/17/18
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Dec 17, 2018, 5:56:04 AM12/17/18
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Dec 17, 2018, 5:56:04 AM12/17/18
to jenkinsc...@googlegroups.com

kiegerhardt@gmail.com (JIRA)

unread,
May 13, 2019, 3:42:02 PM5/13/19
to jenkinsc...@googlegroups.com
kyle ian commented on Bug JENKINS-55214
 
Re: NullPointerException when starting a pipeline in a multibranch project

Ran into this today on 1.9.7 - it appeared to me the cause was a poorly formed parameter block passed to the (node) pipeline on one of my branches.

  • Added new description to parameter on one branch, missing comma after description (groovy linter would've picked it up)
  • All builds under multi pipeline failed with error noted in OP when solely one of the multipipeline branches had bad parameter configuration
  • fixed comma on bad branch parameter configuration (single branch), rescanned multipipeline
  • reran pipeline build for each branch, confirmed fixing that parameter block to be well formed resulted in all successful pipeline builds for each branch

I have not been able to reproduce it after fixing this parameter block // have not tried breaking it again.

kwirth@perforce.com (JIRA)

unread,
May 14, 2019, 4:35:02 AM5/14/19
to jenkinsc...@googlegroups.com

Hi kyle ian, thanks for the update. Do you have a rough example that you think caused the problem that you could share?

kiegerhardt@gmail.com (JIRA)

unread,
May 14, 2019, 10:16:03 AM5/14/19
to jenkinsc...@googlegroups.com
kyle ian commented on Bug JENKINS-55214

Karl Wirth

Steps I took while investigating:

   1. Updated `description` to have comma after value - all sibiling pipelines still failed with NPE
   2. Removed `ParameterDefinitionProperty` from pipeline props entirely - offending pipeline ran successfully without prop with no NPE, sibiling pipelines failed with NPE still
   3. Added parameterDefinitionProperty back, removing redundant `name`
   4. Rescanned multibranch pipeline after (3)
   5. All sibiling multibranch pipelines run successfully without NPE

Example:

properties([
  pipelineTriggers([p4Trigger()]),
  [$class: 'ParametersDefinitionProperty',
    parameterDefinitions:
    [
      [$class: 'hudson.model.BooleanParameterDefinition',
       name: 'I_AM_A_BOOL_PARAMETER_NAME',
       name: 'I_AM_AN_UNNECESSARY_REDUNDANT_BOOL_PARAMETER_NAME',
       description: 'I am a description that is missing a comma after my string ends, which will be detected by linting on a given branch's pipeline, but other pipelines belonging to the same parent multibranch pipeline will fail with JENKINS-55214 NPE until this is corrected.'
       defaultValue: false]
    ]
  ]
])

 

kiegerhardt@gmail.com (JIRA)

unread,
May 14, 2019, 10:16:03 AM5/14/19
to jenkinsc...@googlegroups.com
kyle ian edited a comment on Bug JENKINS-55214
[~p4karl]


Steps I took while investigating:

   1. Updated `description` to have comma after value - all sibiling pipelines still failed with NPE
   2. Removed `ParameterDefinitionProperty` from pipeline props entirely - offending pipeline ran successfully without prop with no NPE, sibiling pipelines failed with NPE still
   3. Added parameterDefinitionProperty back, removing redundant `name`
   4. Rescanned multibranch pipeline after (3)
   5. All sibiling multibranch pipelines run successfully without NPE

Example:


{code:java}

properties([
  pipelineTriggers([p4Trigger()]),
  [$class: 'ParametersDefinitionProperty',
    parameterDefinitions:
    [
      [$class: 'hudson.model.BooleanParameterDefinition',
       name: 'I_AM_A_BOOL_PARAMETER_NAME',
       name: 'I_AM_AN_UNNECESSARY_REDUNDANT_BOOL_PARAMETER_NAME',
       description: 'I am a description that is missing a comma after my string ends, which will be detected by linting on a given branch's branchs pipeline, but other pipelines belonging to the same parent multibranch pipeline will fail with JENKINS-55214 NPE until this is corrected.'
       defaultValue: false]
    ]
  ]
])

{code}
 

pallen@perforce.com (JIRA)

unread,
Dec 5, 2019, 10:32:03 AM12/5/19
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Fixed
 

Closing.  Plugin cannot read invalid pipeline script.

Change By: Paul Allen
Status: Open Closed
Resolution: Fixed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages