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

dockerPushStep in Artifactory plugin conflicts with Jira plugin over Jersey implementation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.46.2, Artifactory plugin 2.11.0, Jira plugin 2.3

      When I try to push a Docker image with Artifactory's dockerPushStep, I get the following exception:

      java.lang.NoSuchMethodError: javax.ws.rs.core.UriBuilder.resolveTemplate(Ljava/lang/String;Ljava/lang/Object;Z)Ljavax/ws/rs/core/UriBuilder;
      at org.glassfish.jersey.client.JerseyWebTarget.resolveTemplate(JerseyWebTarget.java:244)
      at org.glassfish.jersey.client.JerseyWebTarget.resolveTemplate(JerseyWebTarget.java:235)
      at org.glassfish.jersey.client.JerseyWebTarget.resolveTemplate(JerseyWebTarget.java:59)
      at com.github.dockerjava.jaxrs.InspectImageCmdExec.execute(InspectImageCmdExec.java:24)
      at com.github.dockerjava.jaxrs.InspectImageCmdExec.execute(InspectImageCmdExec.java:13)
      at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
      at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
      at com.github.dockerjava.core.command.InspectImageCmdImpl.exec(InspectImageCmdImpl.java:40)
      at org.jfrog.hudson.pipeline.docker.utils.DockerUtils.getImageIdFromTag(DockerUtils.java:44)
      at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils$6.call(DockerAgentUtils.java:241)
      at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils$6.call(DockerAgentUtils.java:239)
      at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
      at ......remote call to docker(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      at hudson.remoting.Channel.call(Channel.java:830)
      Caused: java.io.IOException: Remote call on docker failed
      at hudson.remoting.Channel.call(Channel.java:838)
      at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.getImageIdFromAgent(DockerAgentUtils.java:239)
      at org.jfrog.hudson.pipeline.docker.utils.DockerAgentUtils.registerImageOnAgents(DockerAgentUtils.java:51)
      at org.jfrog.hudson.pipeline.steps.DockerPushStep$Execution.run(DockerPushStep.java:97)
      at org.jfrog.hudson.pipeline.steps.DockerPushStep$Execution.run(DockerPushStep.java:62)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:260)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      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:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Finished: FAILURE

      The pipeline script has been taken from https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Artifactory+Plugin+-+Setting+Up+Docker+Build+Info and is as follows:

       
      node() {
          def server = Artifactory.server('<ArtifactoryServerID>')
          def artDocker= Artifactory.docker('<username>', '<password>')
          def dockerInfo = artDocker.push('<artifactoryDockerRegistry>/hello-world:latest', '<targetRepo>')
          server.publishBuildInfo(dockerInfo)
      }

       

      That problem goes away when JIRA plugin is uninstalled.

            eyalbe Eyal Ben Moshe
            wzurowski Waldemar Zurowski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: