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

NPE when "file" parameter forgotten for s3Upload

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-aws-plugin
    • None

      Sure, it is my fault, but I just forgot the file paramteer for the s3Upload and got the following NPE:

      java.lang.NullPointerException
      at hudson.FilePath.isAbsolute(FilePath.java:283)
      at hudson.FilePath.resolvePathIfRelative(FilePath.java:268)
      at hudson.FilePath.<init>(FilePath.java:264)
      at hudson.FilePath.child(FilePath.java:1275)
      at de.taimos.pipeline.aws.S3UploadStep$Execution.start(S3UploadStep.java:114)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:224)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
      at sun.reflect.GeneratedMethodAccessor472.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1218)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:153)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:157)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      at WorkflowScript.run(WorkflowScript:60)

      Validating parameters end emitting a nice error message would be great.

            hoegertn Thorsten Hoeger
            stephenking Steffen Gebert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: