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

java.lang.NoSuchMethodError: 'mightBePositionalArgumentConstructor'

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • pipeline
    • None

      We are getting below error when we run the jenkins pipeline the current jenkins version 2.346.3
      java.lang.NoSuchMethodError: 'boolean org.kohsuke.groovy.sandbox.SandboxTransformer.mightBePositionalArgumentConstructor(org.codehaus.groovy.ast.expr.VariableExpression)'
      at com.cloudbees.groovy.cps.SandboxCpsTransformer.visitAssignmentOrCast(SandboxCpsTransformer.java:93)
      at com.cloudbees.groovy.cps.CpsTransformer$42.run(CpsTransformer.java:1171)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitDeclarationExpression(CpsTransformer.java:1164)
      at org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:89)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visitExpressionStatement(CpsTransformer.java:589)
      at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$5.run(CpsTransformer.java:515)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitBlockStatement(CpsTransformer.java:512)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer$2.run(CpsTransformer.java:388)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitWithSafepoint(CpsTransformer.java:374)
      at com.cloudbees.groovy.cps.CpsTransformer$27.run(CpsTransformer.java:932)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitClosureExpression(CpsTransformer.java:898)
      at org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:49)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$4.run(CpsTransformer.java:505)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitMethodCallExpression(CpsTransformer.java:487)
      at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:70)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visitExpressionStatement(CpsTransformer.java:589)
      at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$5.run(CpsTransformer.java:515)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitBlockStatement(CpsTransformer.java:512)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer$2.run(CpsTransformer.java:388)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitWithSafepoint(CpsTransformer.java:374)
      at com.cloudbees.groovy.cps.CpsTransformer$27.run(CpsTransformer.java:932)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitClosureExpression(CpsTransformer.java:898)
      at org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:49)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$4.run(CpsTransformer.java:505)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitMethodCallExpression(CpsTransformer.java:487)
      at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:70)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visitExpressionStatement(CpsTransformer.java:589)
      at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$5.run(CpsTransformer.java:515)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitBlockStatement(CpsTransformer.java:512)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer$13.run(CpsTransformer.java:623)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitTryCatchFinally(CpsTransformer.java:620)
      at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:44)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:363)
      at com.cloudbees.groovy.cps.CpsTransformer$5.run(CpsTransformer.java:515)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitBlockStatement(CpsTransformer.java:512)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
      at com.cloudbees.groovy.cps.CpsTransformer.visit(CpsTransformer.java:357)
      at com.cloudbees.groovy.cps.CpsTransformer$2.run(CpsTransformer.java:388)
      at com.cloudbees.groovy.cps.CpsTransformer.makeChildren(CpsTransformer.java:446)
      at com.cloudbees.groovy.cps.CpsTransformer.makeNode(CpsTransformer.java:409)
      at com.cloudbees.groovy.cps.CpsTransformer.visitWithSafepoint(CpsTransformer.java:374)
      at com.cloudbees.groovy.cps.CpsTransformer.visitMethod(CpsTransformer.java:231)
      at com.cloudbees.groovy.cps.SandboxCpsTransformer.visitMethod(SandboxCpsTransformer.java:73)
      at com.cloudbees.groovy.cps.CpsTransformer.call(CpsTransformer.java:136)
      at com.cloudbees.groovy.cps.SandboxCpsTransformer.call(SandboxCpsTransformer.java:29)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:5

          [JENKINS-71522] java.lang.NoSuchMethodError: 'mightBePositionalArgumentConstructor'

          Markus Winter added a comment -

          Markus Winter added a comment - See JENKINS-71003

          ravi added a comment -

          Hi Markus,

          I checked https://issues.jenkins.io/browse/JENKINS-71003 but no resolution on this. What should be done.

          After restart of jenkins we see above issue. 

          Any fix for this ?

          Please advise

          ravi added a comment - Hi Markus, I checked https://issues.jenkins.io/browse/JENKINS-71003 but no resolution on this. What should be done. After restart of jenkins we see above issue.  Any fix for this ? Please advise

          Mark Waite added a comment - - edited

          Closing as a duplicate of JENKINS-71003

          This should only happen if you upgrade script-security to a version that includes this security fix but do not update workflow-cps at the same time (see the warning message at the bottom of that section). Make sure both plugins are updated to at least the versions described on that page.

          Upgrade all plugins as part of upgrades of Jenkins core.

          If you believe this is not a duplicate of that issue, then you'll need to provide enough information as requested in "How to report an issue". That additional information should include the precise list of plugins and their versions as generated from the script console with the script in "How to report an issue". That additional information should include the precise steps you take so that others can duplicate the issue.

          It is not enough to ask:

          Any fix for this?

          Since Jenkins project volunteers cannot duplicate the issue based on your description, they are unlikely to offer a fix.

          Mark Waite added a comment - - edited Closing as a duplicate of JENKINS-71003 This should only happen if you upgrade script-security to a version that includes this security fix but do not update workflow-cps at the same time (see the warning message at the bottom of that section). Make sure both plugins are updated to at least the versions described on that page. Upgrade all plugins as part of upgrades of Jenkins core. If you believe this is not a duplicate of that issue, then you'll need to provide enough information as requested in "How to report an issue" . That additional information should include the precise list of plugins and their versions as generated from the script console with the script in "How to report an issue" . That additional information should include the precise steps you take so that others can duplicate the issue. It is not enough to ask: Any fix for this? Since Jenkins project volunteers cannot duplicate the issue based on your description, they are unlikely to offer a fix.

          ravi added a comment - - edited

          markewaite mawinter69 

          Thanks for your reply ,

          I re-opened the ticket and providing more information

          The jenkins server is running in a pod and node restarted and so the pod.   After restart the pipeline it is throwing above error mentioned in description. This is specific to the pipeline. Other pipeline is working.

          Jenkins Version : 2.346.3

          I see in stack overflow , we need to update "pipeline: Groovy" plugins.

          Currently installed plugins are below, Updates are available for pipeline: Groovy but not for script secutiry plugin.

           

           

          ravi added a comment - - edited markewaite mawinter69   Thanks for your reply , I re-opened the ticket and providing more information The jenkins server is running in a pod and node restarted and so the pod.   After restart the pipeline it is throwing above error mentioned in description. This is specific to the pipeline. Other pipeline is working. Jenkins Version : 2.346.3 I see in stack overflow , we need to update "pipeline: Groovy" plugins. Currently installed plugins are below, Updates are available for pipeline: Groovy but not for script secutiry plugin.    

          Mark Waite added a comment -

          I said:

          If you believe this is not a duplicate of that issue, then you'll need to provide enough information as requested in "How to report an issue". That additional information should include the precise list of plugins and their versions as generated from the script console with the script in "How to report an issue". That additional information should include the precise steps you take so that others can duplicate the issue.

          You did not follow the instructions in "How to report an issue". You reopened the issue without providing the precise list of plugins. Even more important, you're asking for help on an old Jenkins version that has known security vulnerabilities and is not receiving security fixes.

          A bug report to an open source project is an attempt to persuade others to donate their time to help you. When you do not follow instructions from others, they are much less likely to donate their time to help you.

          Mark Waite added a comment - I said: If you believe this is not a duplicate of that issue, then you'll need to provide enough information as requested in "How to report an issue". That additional information should include the precise list of plugins and their versions as generated from the script console with the script in "How to report an issue". That additional information should include the precise steps you take so that others can duplicate the issue. You did not follow the instructions in "How to report an issue". You reopened the issue without providing the precise list of plugins. Even more important, you're asking for help on an old Jenkins version that has known security vulnerabilities and is not receiving security fixes. A bug report to an open source project is an attempt to persuade others to donate their time to help you. When you do not follow instructions from others, they are much less likely to donate their time to help you.

          ravi added a comment -

          markewaite 

          Thanks for your inputs, The issue looks similar but I need to test the fix.

          If I need help will come back with all the information https://www.jenkins.io/participate/report-issue/

          Thanks again for your time.

          ravi added a comment - markewaite   Thanks for your inputs, The issue looks similar but I need to test the fix. If I need help will come back with all the information https://www.jenkins.io/participate/report-issue/ Thanks again for your time.

          ravi added a comment -

          markewaite 

          After updating the plugins the issue now resolved.Thanks

          ravi added a comment - markewaite   After updating the plugins the issue now resolved.Thanks

            Unassigned Unassigned
            ravik76 ravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: