groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException

Google Groups | jgl...@cloudbees.com (JIRA) | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [JIRA] (JENKINS-38167) NPE when using properties from @Field in workflow-cps 2.14

    Google Groups | 7 months ago | jgl...@cloudbees.com (JIRA)
    groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
  2. 0

    Scripts using {{@Field}} instance initializers which referred to properties on the {{Script}} such as {{binding}} broke as of {{workflow-cps}} 2.14 with {code:none} 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:430) at groovy.lang.GroovyShell.parse(GroovyShell.java:743) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:410) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:373) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:213) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.NullPointerException at org.jenkinsci.plugins.workflow.cps.CpsScript.$build(CpsScript.java:137) at org.jenkinsci.plugins.workflow.cps.CpsScript.$buildNoException(CpsScript.java:148) at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:125) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at WorkflowScript.<init>(WorkflowScript:...) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang.Class.newInstance(Class.java:442) at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408) ... 7 more {code}

    Jenkins JIRA | 7 months ago | Jesse Glick
    groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
  3. 0

    [JIRA] (JENKINS-39171) NPE when using properties from @Field in multibranch-pipeline

    Google Groups | 6 months ago | artur.t...@gmail.com (JIRA)
    groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.jenkinsci.plugins.workflow.cps.CpsScript.$build()
    2. org.jenkinsci.plugins
      CpsScript.getProperty
      1. org.jenkinsci.plugins.workflow.cps.CpsScript.$build(CpsScript.java:137)
      2. org.jenkinsci.plugins.workflow.cps.CpsScript.$buildNoException(CpsScript.java:148)
      3. org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:125)
      3 frames
    3. Groovy
      AbstractCallSite.callGroovyObjectGetProperty
      1. org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
      2 frames