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

Gitlab Branch Source Plugin v1.5.1 and upwards unable to checkout code in a multibranch pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins Version: 2.263.4
      Gitlab Branch Source plugin Version: 1.5.1

      When using the Gitlab Branch source plugin v1.5.1 and upwards in a Multibranch Pipeline, the code checkout is failing with the below error on the Jenkins console:
      Querying the current revision of branch master...[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.lang.ClassCastException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
      at java.lang.Class.cast(Class.java:3369)
      at org.glassfish.jersey.internal.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:690)
      at org.glassfish.jersey.internal.inject.Injections.lookupService(Injections.java:88)
      at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:73)
      at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:44)
      at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:412)
      at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317)
      at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:807)
      at org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:219)
      at org.glassfish.jersey.client.ClientRequest.getInjectionManager(ClientRequest.java:610)
      at org.glassfish.jersey.client.JerseyWebTarget.onBuilder(JerseyWebTarget.java:364)
      at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:192)
      at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:36)
      at org.gitlab4j.api.GitLabApiClient.invocation(GitLabApiClient.java:783)
      at org.gitlab4j.api.GitLabApiClient.invocation(GitLabApiClient.java:748)
      at org.gitlab4j.api.GitLabApiClient.get(GitLabApiClient.java:399)
      at org.gitlab4j.api.GitLabApiClient.get(GitLabApiClient.java:387)
      at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:213)
      Caused: org.gitlab4j.api.GitLabApiException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
      at org.gitlab4j.api.AbstractApi.handle(AbstractApi.java:655)
      at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:215)
      at org.gitlab4j.api.RepositoryApi.getBranch(RepositoryApi.java:104)
      at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:257)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
      at org.jenkinsci.plugins.workflow.multibranch.SCMVar.getValue(SCMVar.java:101)
      at org.jenkinsci.plugins.workflow.multibranch.SCMVar.getValue(SCMVar.java:58)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:135)
      at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
      at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:355)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:354)
      at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:353)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:357)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
      at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
      Caused: java.io.IOException: Failed to retrieve the SCM revision for master
      at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:297)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
      at org.jenkinsci.plugins.workflow.multibranch.SCMVar.getValue(SCMVar.java:101)
      at org.jenkinsci.plugins.workflow.multibranch.SCMVar.getValue(SCMVar.java:58)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:135)
      at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
      at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:355)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:354)
      at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:353)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:357)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
      at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
      at WorkflowScript.run(WorkflowScript:8)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(ModelInterpreter.groovy:137)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:661)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:395)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:393)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:660)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:288)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:544)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:543)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:276)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:443)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:442)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:275)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:481)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:480)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:274)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:586)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:585)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:272)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:356)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:355)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:261)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:613)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:612)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:259)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:443)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:442)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:254)
      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.GeneratedMethodAccessor395.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      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:83)
      at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
      at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
       

            vmspot Vinicius Monteiro
            santoshdj Santosh
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: