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

[withCredentials] NPE in snippet generator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • pipeline
    • Jenkins ver. 1.625.2.2 (CloudBees Jenkins Enterprise 15.11)

      java.lang.RuntimeException: Failed to instantiate class org.jenkinsci.plugins.credentialsbinding.impl.BindingStep from {"bindings":{"usernameVariable":"MVN_USERNAME","passwordVariable":"MVN_PASSWORD","credentialsId":["cf-hackney-cleclerc-credentials",""],"stapler-class":"org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding","$class":"org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding"},"stapler-class":"org.jenkinsci.plugins.credentialsbinding.impl.BindingStep","$class":"org.jenkinsci.plugins.credentialsbinding.impl.BindingStep"}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:579)
      	at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet(Snippetizer.java:215)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	...
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      	at ...
      Caused by: java.lang.NullPointerException
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:645)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:697)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:638)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:697)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:570)
      	... 94 more
      
      <?xml version="1.0" encoding="UTF-8"?>
      <flow-definition plugin="workflow-job@1.11">
         <actions />
         <description />
         <keepDependencies>false</keepDependencies>
         <properties />
         <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@1.11">
            <script>node { }</script>
            <sandbox>false</sandbox>
         </definition>
         <triggers />
      </flow-definition>
      

        1. npe-snippet-generator.png
          159 kB
          Cyrille Le Clerc

            jglick Jesse Glick
            cleclerc Cyrille Le Clerc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: