java.lang.LinkageError: ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class

Jenkins JIRA | Lionel Beard | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I am not able to start and use docker-build-step-plugin. It seems there is a conflict with a jar file (javax.ws.rs-api-2.0.jar) also present under docker-plugin lib directory: Error injecting constructor, java.lang.LinkageError: ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.<init>(Unknown Source) 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:429) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051) at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:391) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:382) at hudson.ExtensionFinder._find(ExtensionFinder.java:151) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:345) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.iterator(ExtensionList.java:143) at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1174) at hudson.plugins.copyartifact.BuildSelectorParameter.initAliases(BuildSelectorParameter.java:99) at hudson.plugins.copyartifact.CopyArtifactPlugin.postInitialize(CopyArtifactPlugin.java:35) at hudson.PluginManager$2$1$2.run(PluginManager.java:386) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:886) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Jenkins JIRA | 2 years ago | Lionel Beard
    java.lang.LinkageError: ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class
  2. 0

    I am not able to start and use docker-build-step-plugin. It seems there is a conflict with a jar file (javax.ws.rs-api-2.0.jar) also present under docker-plugin lib directory: Error injecting constructor, java.lang.LinkageError: ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.<init>(Unknown Source) 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:429) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051) at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:391) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:382) at hudson.ExtensionFinder._find(ExtensionFinder.java:151) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:345) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.iterator(ExtensionList.java:143) at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1174) at hudson.plugins.copyartifact.BuildSelectorParameter.initAliases(BuildSelectorParameter.java:99) at hudson.plugins.copyartifact.CopyArtifactPlugin.postInitialize(CopyArtifactPlugin.java:35) at hudson.PluginManager$2$1$2.run(PluginManager.java:386) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:886) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Jenkins JIRA | 2 years ago | Lionel Beard
    java.lang.LinkageError: ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class
  3. 0

    [JENKINS-25692] Incompatibility with docker-plugin? - Jenkins JIRA

    jenkins-ci.org | 8 months ago
    java.lang.LinkageError: ClassCastException: attempting to castjar: to jar:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.LinkageError

      ClassCastException: attempting to castjar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/var/lib/jenkins/plugins/docker-build-step/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/client/ClientBuilder.class

      at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.<init>()
    2. org.jenkinsci.plugins
      DockerBuilder$DescriptorImpl.<init>
      1. org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.<init>(Unknown Source)
      1 frame