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

Regression: Invoking static methods on global variables

XMLWordPrintable

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

      There seems to be issue with invoking static methods on global variables after updating to Pipeline Shared Groovy Libraries Plugin 2.1. (I reverted back to 2.0 already)

      Following is supposed to work:
      workflowLibs/vars/TEST.groovy

      def testMethod(String options = '') {
      ...
      }
      
      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: static TEST.testMethod() is applicable for argument types: (java.lang.String) values: [47380]
      Possible solutions: testMethod(java.lang.String), testMethod()
      	at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1367)
      	at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1353)
      	at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
      	at WorkflowScript.run(WorkflowScript:6)
      
      

            jglick Jesse Glick
            vehovmar Martin Vehovsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: