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
  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 | 4 months ago
    java.lang.LinkageError: ClassCastException: attempting to castjar: to jar:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HTTP ERROR 404 - Serena Central

    serena.com | 4 months ago
    javax.servlet.ServletException: java.lang.LinkageError: ClassCastException: attempting to castjar:file:/C:/Jenkins/war/WEB-INF/lib/jsr311-api-1.1.1.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/C:/Jenkins/plugins/sra-deploy/WEB-INF/lib/jersey-bundle-1.17.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class
  6. 0

    cxf-dev - Missing dependency for method public void org.apache.cxf ...

    nabble.com | 1 year ago
    java.lang.LinkageError: ClassCastException: attempting to castzip:/usr/vineetDir/em1.4M_install_JSF_NEW/core.war/WEB-INF/lib/javax.ws.rs-api-2.0-m10.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/software/wls12120/oracle_common/modules/jersey-core-1.17.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    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