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

@grab no longer works in jenkins v2.176.2

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I had a jenkinsfile pipeline that run successfully in v2.89.4

      But the same pipeline throws the following error in v2.176.2

       
      java.lang.RuntimeException: No suitable ClassLoader found for grab

       

      My jenkinsfile looks like

       

      @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0-RC2')
      import groovy.json.JsonOutput
      import groovyx.net.http.RESTClient
      import static groovyx.net.http.ContentType.JSON
      import groovy.json.JsonSlurper
      import groovy.io.FileType
      
      def call(body) {
          pipelineConfig = [:]
          body.resolveStrategy = Closure.DELEGATE_FIRST
          body.delegate = pipelineConfig
      
          pipeline {...}
      }
      
      

       

        Attachments

          Issue Links

            Activity

            nsurana Nitin Surana created issue -
            nsurana Nitin Surana made changes -
            Field Original Value New Value
            Description I had a jenkinsfile pipeline that run successfully in v2.89.4

            But the same pipeline throws the following error in v2.176.2

             
            java.lang.RuntimeException: No suitable ClassLoader found for grab
            I had a jenkinsfile pipeline that run successfully in v2.89.4

            But the same pipeline throws the following error in v2.176.2

             
             java.lang.RuntimeException: No suitable ClassLoader found for grab

             

            My jenkinsfile looks like

             
            {code:java}
            @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0-RC2')
            import groovy.json.JsonOutput
            import groovyx.net.http.RESTClient
            import static groovyx.net.http.ContentType.JSON
            import groovy.json.JsonSlurper
            import groovy.io.FileType

            def call(body) {
                pipelineConfig = [:]
                body.resolveStrategy = Closure.DELEGATE_FIRST
                body.delegate = pipelineConfig

                pipeline {...}
            }

            {code}
             
            nsurana Nitin Surana made changes -
            Link This issue duplicates JENKINS-41122 [ JENKINS-41122 ]
            nsurana Nitin Surana made changes -
            Assignee Nitin Surana [ nsurana ]
            Resolution Not A Defect [ 7 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            nsurana Nitin Surana made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

              People

              Assignee:
              nsurana Nitin Surana
              Reporter:
              nsurana Nitin Surana
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: