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

Artifactory server configuration throwing 'loader constraint violation' error

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When i tried to add my artifactory server then its throwing the error like,
       

         
           

      ERROR
      A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.

      Stack trace

      javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.client.HttpClientBuilder.setDefaultCredentialsProvider(Lorg/apache/http/client/CredentialsProvider;)Lorg/apache/http/impl/client/HttpClientBuilder;" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/jfrog/build/client/PreemptiveHttpClient, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, org/apache/http/impl/client/HttpClientBuilder, have different Class objects for the type org/apache/http/client/CredentialsProvider used in the signature at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.client.HttpClientBuilder.setDefaultCredentialsProvider(Lorg/apache/http/client/CredentialsProvider;)Lorg/apache/http/impl/client/HttpClientBuilder;" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/jfrog/build/client/PreemptiveHttpClient, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, org/apache/http/impl/client/HttpClientBuilder, have different Class objects for the type org/apache/http/client/CredentialsProvider used in the signature at org.jfrog.build.client.PreemptiveHttpClient.createHttpClientBuilder(PreemptiveHttpClient.java:117) at org.jfrog.build.client.PreemptiveHttpClient.<init>(PreemptiveHttpClient.java:72) at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:125) at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:120) at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:133) at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.verifyCompatibleArtifactoryVersion(ArtifactoryBuildInfoClient.java:294) at org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl.doTestConnection(ArtifactoryBuilder.java:174) at sun.reflect.GeneratedMethodAccessor1394.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:320) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:163) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) ... 49 more
       
      Is there any thing am missing or is it bug in plugin ?

        Attachments

          Activity

          Hide
          adityacs Aditya C S added a comment - - edited

          Eyal Ben Moshe I had similar issue in InfluxDB plugin(https://issues.jenkins-ci.org/browse/JENKINS-44669). I have tried updating the library(httpcore) to latest version. Even then issue persists. 

          Show
          adityacs Aditya C S added a comment - - edited Eyal Ben Moshe I had similar issue in InfluxDB plugin( https://issues.jenkins-ci.org/browse/JENKINS-44669 ). I have tried updating the library(httpcore) to latest version. Even then issue persists. 
          Hide
          bahadir_g bahadir guldiken added a comment -

          Having same problem on Windows:

          Jenkins ver. 1.611   -  ArtifactoryPlugin 2.12.2

          Jenkins ver. 1.609.3  - ArtifactoryPlugin 2.12.2 (clean install of Jenkins with no other plugin instead of Artifactory)

          Show
          bahadir_g bahadir guldiken added a comment - Having same problem on Windows: Jenkins ver. 1.611    -  ArtifactoryPlugin  2.12.2 Jenkins ver. 1.609.3   - ArtifactoryPlugin  2.12.2  (clean install of Jenkins with no other plugin instead of Artifactory)
          Hide
          atikhono Anna Tikhonova added a comment -

          I'm experiencing the same issue. Jenkins 1.651.1 and Artifactory plugin 2.13.1.

          Show
          atikhono Anna Tikhonova added a comment - I'm experiencing the same issue. Jenkins 1.651.1 and Artifactory plugin 2.13.1.
          Hide
          krlf Kirill Fedoseev added a comment -

          The same

          Jenkins: 1.651.3

          Artifactory : 2.13.1

          Show
          krlf Kirill Fedoseev added a comment - The same Jenkins: 1.651.3 Artifactory : 2.13.1
          Hide
          eyalbe Eyal Ben Moshe added a comment -

          bahadir guldiken,
          I see that you got this error with a clean Jenkins 1.6 installation, having only the latest Artifactory Plugin installed.
          I'm rally curious to know if you'd experience this with a Jenkins 2.x installation.
          The cause of the conflict seems to be clear - an older http client version is loaded by the JVM and the Artifactory Plugin (which is compiled with another version of the client) crashes.
          If we modify the Artifactory Plugin and have it use an older version of the client, this issue will be probably resolved, the other features, such as SNI support will be lost.
          Can anyone please try this with a clean Jenkins 2.x instance (should be very easy to setup locally) having only the Artifactory Plugin installed?

          Show
          eyalbe Eyal Ben Moshe added a comment - bahadir guldiken , I see that you got this error with a clean Jenkins 1.6 installation, having only the latest Artifactory Plugin installed. I'm rally curious to know if you'd experience this with a Jenkins 2.x installation. The cause of the conflict seems to be clear - an older http client version is loaded by the JVM and the Artifactory Plugin (which is compiled with another version of the client) crashes. If we modify the Artifactory Plugin and have it use an older version of the client, this issue will be probably resolved, the other features, such as SNI support will be lost. Can anyone please try this with a clean Jenkins 2.x instance (should be very easy to setup locally) having only the Artifactory Plugin installed?

            People

            Assignee:
            eyalbe Eyal Ben Moshe
            Reporter:
            ranjith31 Ranjith Kumar
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated: