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

NullPointerException when using parameter separator in a pipeline

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 2.32.2
      Pipeline 2.5
      Pipeline Groovy 2.25
      Parameter Separator 1.0
    • Similar Issues:

      Description

      Using the parameter separator plug-in in a pipeline job will throw a NullPointerException when accessing global variable "params"

      java.lang.NullPointerException
      	at org.jenkinsci.plugins.workflow.cps.persistence.IteratorHack.writeReplace(IteratorHack.java:52)
      	at org.jenkinsci.plugins.workflow.cps.ParamsVariable.addValue(ParamsVariable.java:88)
      	at org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue(ParamsVariable.java:66)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:121)
      	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
      	at groovy.lang.Closure.getPropertyTryThese(Closure.java:312)
      	at groovy.lang.Closure.getPropertyOwnerFirst(Closure.java:306)
      	at groovy.lang.Closure.getProperty(Closure.java:295)
      	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
      	at groovy.lang.Closure.getPropertyTryThese(Closure.java:312)
      	at groovy.lang.Closure.getPropertyOwnerFirst(Closure.java:306)
      	at groovy.lang.Closure.getProperty(Closure.java:295)
      	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
      	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:33)
      	at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
      	at Script2.run(Script2.groovy:178)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
      	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
      	at sun.reflect.GeneratedMethodAccessor463.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:74)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Chmielewski
            Path:
            src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java
            http://jenkins-ci.org/commit/parameter-separator-plugin/560ec98eb47aac44e9e68dc665a8ad9ca8e9a932
            Log:
            JENKINS-41712: Overriding getValue() (#6)

            Based on bug, we should not return null, so we are returning toString() result instead.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Chmielewski Path: src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java http://jenkins-ci.org/commit/parameter-separator-plugin/560ec98eb47aac44e9e68dc665a8ad9ca8e9a932 Log: JENKINS-41712 : Overriding getValue() (#6) JENKINS-41712 : Overriding getValue() Based on bug, we should not return null, so we are returning toString() result instead. JENKINS-41712 : Update getvalue( ) to return String JENKINS-41712 : Do not force @override JENKINS-41712 : Remove annotation
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Chmielewski
            Path:
            src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java
            http://jenkins-ci.org/commit/parameter-separator-plugin/afd2131ebbb8587dc671dd0f03fb36115c9ace20
            Log:
            JENKINS-41712: Remove annotation

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Chmielewski Path: src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java http://jenkins-ci.org/commit/parameter-separator-plugin/afd2131ebbb8587dc671dd0f03fb36115c9ace20 Log: JENKINS-41712 : Remove annotation
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Chmielewski
            Path:
            src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java
            http://jenkins-ci.org/commit/parameter-separator-plugin/2868e5feabac8955457cba16966ad66b75b5cc80
            Log:
            JENKINS-41712: Do not force @override

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Chmielewski Path: src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java http://jenkins-ci.org/commit/parameter-separator-plugin/2868e5feabac8955457cba16966ad66b75b5cc80 Log: JENKINS-41712 : Do not force @override
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Chmielewski
            Path:
            src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java
            http://jenkins-ci.org/commit/parameter-separator-plugin/c2636df5d9cebf80fa2feffa63432560ef7b9825
            Log:
            JENKINS-41712: Update getvalue( ) to return String

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Chmielewski Path: src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java http://jenkins-ci.org/commit/parameter-separator-plugin/c2636df5d9cebf80fa2feffa63432560ef7b9825 Log: JENKINS-41712 : Update getvalue( ) to return String
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Chmielewski
            Path:
            src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java
            http://jenkins-ci.org/commit/parameter-separator-plugin/2b292f47c45b6ca32b413ed63a5daa0816cefd16
            Log:
            JENKINS-41712: Overriding getValue()

            Based on bug, we should not return null, so we are returning toString() result instead.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Chmielewski Path: src/main/java/jenkins/plugins/parameter_separator/ParameterSeparatorValue.java http://jenkins-ci.org/commit/parameter-separator-plugin/2b292f47c45b6ca32b413ed63a5daa0816cefd16 Log: JENKINS-41712 : Overriding getValue() Based on bug, we should not return null, so we are returning toString() result instead.
            Hide
            jglick Jesse Glick added a comment -

            ParamsVariable.addValue should treat null as Serializable. But I think it is also a bug in parameter-separator; ParameterValue.getValue should not return null AFAIK.

            Show
            jglick Jesse Glick added a comment - ParamsVariable.addValue should treat null as Serializable . But I think it is also a bug in parameter-separator ; ParameterValue.getValue should not return null AFAIK.

              People

              • Assignee:
                Unassigned
                Reporter:
                gordin Christoph VogtlÃĪnder
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: