Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39171

NPE when using properties from @Field in multibranch-pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • workflow-cps-plugin
    • None
    • JENKINS 2.19.1
      PIPELINE-MULTIBRANCH 2.9

      groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
      	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:464)
      	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:411)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:374)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:220)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Caused by: java.lang.NullPointerException
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.$build(CpsScript.java:141)
      	at org.jenkinsci.plugins.workflow.cps.EnvActionImpl$Binder.getValue(EnvActionImpl.java:140)
      	at org.jenkinsci.plugins.workflow.cps.EnvActionImpl$Binder.getValue(EnvActionImpl.java:135)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:121)
      	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:50)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
      	at WorkflowScript.<init>(WorkflowScript)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      	at java.lang.reflect.Constructor.newInstance(Unknown Source)
      	at java.lang.Class.newInstance(Unknown Source)
      	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:432)
      	... 7 more
      

            Unassigned Unassigned
            atanistra Artur Tanistra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: