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

Binary Compatibility between JIRA Plugin and Apache HttpComponents Client 4.x API

    • Blue Ocean 1.4 - beta 3, Blue Ocean 1.5 - beta 3, Blue Ocean 1.6 - beta 2

      java.lang.IllegalAccessError: org/apache/http/impl/client/cache/BasicHttpCache
          at org.apache.http.impl.client.cache.CachingHttpAsyncClient.<init>(CachingHttpAsyncClient.java:173)
          at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:239)
          at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:123)
          at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:68)
          at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:35)
          at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:63)
          at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:35)
          at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.createWithBasicHttpAuthentication(AsynchronousJiraRestClientFactory.java:42)
          at hudson.plugins.jira.JiraSite.createSession(JiraSite.java:280)
          at hudson.plugins.jira.JiraSite$DescriptorImpl.doValidate(JiraSite.java:782)
          at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      Caused: java.lang.reflect.InvocationTargetException
      
      [WARNING] Error while serving http://localhost:8090/jenkins/descriptorByName/hudson.plugins.jira.JiraSite/validate
      java.lang.reflect.InvocationTargetException
      	at ...
      Caused by: java.lang.IllegalAccessError: tried to access class org.apache.http.impl.client.cache.BasicHttpCache from class org.apache.http.impl.client.cache.CachingHttpAsyncClient
      	at org.apache.http.impl.client.cache.CachingHttpAsyncClient.<init>(CachingHttpAsyncClient.java:173)
      	at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:239)
      	at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:123)
      	at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:68)
      	at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:35)
      	at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:63)
      	at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:35)
      	at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.createWithBasicHttpAuthentication(AsynchronousJiraRestClientFactory.java:42)
      	at hudson.plugins.jira.JiraSite.createSession(JiraSite.java:303)
      	at hudson.plugins.jira.JiraSite$DescriptorImpl.doValidate(JiraSite.java:805)
      	... 65 more
      

          [JENKINS-48357] Binary Compatibility between JIRA Plugin and Apache HttpComponents Client 4.x API

          Mark Waite added a comment - - edited

          Thanks tibor17. The most interesting is the output the next time you see it hang.

          That unreleased plugin build is based on the git client plugin 3.0.0-beta. If that unreleased plugin version resolves all the instances of hanging in your environment then I'll probably need to build a different unreleased plugin version which contains exactly git client plugin 2.7.1 plus that additional logging statement.

          Rather than risk further delay, if you need git client plugin 2.7.1 plus the extra 'FINISHED' logging statements, download git client plugin 2.7.2-SNAPSHOT unreleased

          Mark Waite added a comment - - edited Thanks tibor17 . The most interesting is the output the next time you see it hang. That unreleased plugin build is based on the git client plugin 3.0.0-beta. If that unreleased plugin version resolves all the instances of hanging in your environment then I'll probably need to build a different unreleased plugin version which contains exactly git client plugin 2.7.1 plus that additional logging statement. Rather than risk further delay, if you need git client plugin 2.7.1 plus the extra 'FINISHED' logging statements, download git client plugin 2.7.2-SNAPSHOT unreleased

          Tibor Digana added a comment -

          olamy
          Maybe OSGi would be quite a big deal for the developers. Would it be a generic solution of such problems in all Jenkins plugins?
          Each Jenkins plugin may have isolated version of JIRA Client and Apache HTTP client.

          Tibor Digana added a comment - olamy Maybe OSGi would be quite a big deal for the developers. Would it be a generic solution of such problems in all Jenkins plugins? Each Jenkins plugin may have isolated version of JIRA Client and Apache HTTP client.

          Tibor Digana added a comment -

          markewaite
          Ok Mark, just ping me when you need my test again. I will try to make few more commits next days on my system.

          Tibor Digana added a comment - markewaite Ok Mark, just ping me when you need my test again. I will try to make few more commits next days on my system.

          Mark Waite added a comment -

          tibor17 I provided the extra logging in the git client plugin so that we could confirm my belief that what you're reporting as "hang in git rev-list" is not actually in the "git rev-list" command or even in the git client plugin that executes "git rev-list".

          I can't duplicate this problem in my environment. The extra logging in the git client plugin is intended to help you confirm (or refute) my hypothesis that the problem is happening somewhere other than the git client plugin.

          If prior to installing the unreleased git client plugin you saw 100% of the executions of that job hang, and the unreleased git client plugin never hangs, then you should switch to the unreleased git client plugin 2.7.2 to reduce the changes between the system that hangs and the system that never hangs.

          Mark Waite added a comment - tibor17 I provided the extra logging in the git client plugin so that we could confirm my belief that what you're reporting as "hang in git rev-list" is not actually in the "git rev-list" command or even in the git client plugin that executes "git rev-list". I can't duplicate this problem in my environment. The extra logging in the git client plugin is intended to help you confirm (or refute) my hypothesis that the problem is happening somewhere other than the git client plugin. If prior to installing the unreleased git client plugin you saw 100% of the executions of that job hang, and the unreleased git client plugin never hangs, then you should switch to the unreleased git client plugin 2.7.2 to reduce the changes between the system that hangs and the system that never hangs.

          Tibor Digana added a comment -

          olamy
          markewaite
          I updated both plugins Git Client and JIRA. So it means the change in JIRA was the one which made the build to continue without hanging. The second commit runs as well.

          Tibor Digana added a comment - olamy markewaite I updated both plugins Git Client and JIRA. So it means the change in JIRA was the one which made the build to continue without hanging. The second commit runs as well.

          Vivek Pandey added a comment -

          tibor17 Thanks for confirming jira plugin fixes the issue. olamy another data point to go ahead with merge and release jira plugin

          Vivek Pandey added a comment - tibor17 Thanks for confirming jira plugin fixes the issue. olamy another data point to go ahead with merge and release jira plugin

          Tibor Digana added a comment -

          olamy
          vivek
          After I have downgraded Git Client back to 2.7.1 release and still used Olivier's SNAPSHOT of JIRA plugin the build did not hang, hopefully it's fine.

          Tibor Digana added a comment - olamy vivek After I have downgraded Git Client back to 2.7.1 release and still used Olivier's SNAPSHOT of JIRA plugin the build did not hang, hopefully it's fine.

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          README.md
          pom.xml
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/ApacheAsyncHttpClient.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/CommonBuilder.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultHttpClientFactory.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultMessage.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultRequest.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultResponse.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/EntityByteArrayInputStream.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/Headers.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/MavenUtils.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/PromiseHttpAsyncClient.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/RedirectStrategy.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/RequestEntityEffect.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/SettableFuturePromiseHttpPromiseAsyncClient.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProvidedProxyConfig.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyConfig.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyConfigFactory.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyCredentialsProvider.java
          src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/SystemPropertiesProxyConfig.java
          src/main/java/com/atlassian/httpclient/base/event/AbstractHttpRequestEvent.java
          src/main/java/com/atlassian/httpclient/base/event/HttpRequestCompletedEvent.java
          src/main/java/com/atlassian/httpclient/base/event/HttpRequestFailedEvent.java
          src/main/resources/atlassian-httpclient-plugin-0.23.0.pom
          http://jenkins-ci.org/commit/jira-plugin/abd092848b1e617ceb31b16de07b1445d34c4d03
          Log:
          JENKINS-48357 get rid of atlassian http client (#145)

          JENKINS-48357

          • import sources from Atlassian Async HttpClient so we can use whatever we want as apache httpclient version

          Signed-off-by: olivier lamy <olamy@apache.org>

          • remove non used imported classes

          Signed-off-by: olivier lamy <olamy@apache.org>

          • get rid of this class

          Signed-off-by: olivier lamy <olamy@apache.org>

          • modern

          Signed-off-by: olivier lamy <olamy@apache.org>

          • add note on Atlassian sources import

          Signed-off-by: olivier lamy <olamy@apache.org>

          • add Atlassian pom for history purpose

          Signed-off-by: olivier lamy <olamy@apache.org>

          Signed-off-by: olivier lamy <olamy@apache.org>

          • get rid of this httpasyncclient-cache

          Signed-off-by: olivier lamy <olamy@apache.org>

          • use last apache-httpcomponents-client-4-api 4.5.5-2.0 which include asynchttpclient now

          Signed-off-by: olivier lamy <olamy@apache.org>

          • add back jenkins-ci repo

          Signed-off-by: olivier lamy <olamy@apache.org>

          • exclude atlassian classes from coverage

          Signed-off-by: olivier lamy <olamy@apache.org>

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: README.md pom.xml src/main/java/com/atlassian/httpclient/apache/httpcomponents/ApacheAsyncHttpClient.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/CommonBuilder.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultHttpClientFactory.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultMessage.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultRequest.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/DefaultResponse.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/EntityByteArrayInputStream.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/Headers.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/MavenUtils.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/PromiseHttpAsyncClient.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/RedirectStrategy.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/RequestEntityEffect.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/SettableFuturePromiseHttpPromiseAsyncClient.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProvidedProxyConfig.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyConfig.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyConfigFactory.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyCredentialsProvider.java src/main/java/com/atlassian/httpclient/apache/httpcomponents/proxy/SystemPropertiesProxyConfig.java src/main/java/com/atlassian/httpclient/base/event/AbstractHttpRequestEvent.java src/main/java/com/atlassian/httpclient/base/event/HttpRequestCompletedEvent.java src/main/java/com/atlassian/httpclient/base/event/HttpRequestFailedEvent.java src/main/resources/atlassian-httpclient-plugin-0.23.0.pom http://jenkins-ci.org/commit/jira-plugin/abd092848b1e617ceb31b16de07b1445d34c4d03 Log: JENKINS-48357 get rid of atlassian http client (#145) JENKINS-48357 import sources from Atlassian Async HttpClient so we can use whatever we want as apache httpclient version Signed-off-by: olivier lamy <olamy@apache.org> remove non used imported classes Signed-off-by: olivier lamy <olamy@apache.org> get rid of this class Signed-off-by: olivier lamy <olamy@apache.org> modern Signed-off-by: olivier lamy <olamy@apache.org> add note on Atlassian sources import Signed-off-by: olivier lamy <olamy@apache.org> add Atlassian pom for history purpose Signed-off-by: olivier lamy <olamy@apache.org> JENKINS-48357 get rid of non used class Signed-off-by: olivier lamy <olamy@apache.org> get rid of this httpasyncclient-cache Signed-off-by: olivier lamy <olamy@apache.org> use last apache-httpcomponents-client-4-api 4.5.5-2.0 which include asynchttpclient now Signed-off-by: olivier lamy <olamy@apache.org> add back jenkins-ci repo Signed-off-by: olivier lamy <olamy@apache.org> exclude atlassian classes from coverage Signed-off-by: olivier lamy <olamy@apache.org> * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Tibor Digana added a comment -

          olamy
          Now my build does not hang but I have a new issue with Jira plugin because when I commit with messages which matches a pattern, the Jira plugin times out immediately. Maybe in less than one second. In the Management are two sections: JIRA and JIRA Sites. The first has successful login but the second fails. Why this happens?

          Tibor Digana added a comment - olamy Now my build does not hang but I have a new issue with Jira plugin because when I commit with messages which matches a pattern, the Jira plugin times out immediately. Maybe in less than one second. In the Management are two sections: JIRA and JIRA Sites. The first has successful login but the second fails. Why this happens?

          Mark Waite added a comment -

          Tibor, I think you'll get better results with a new bug report rather than asking questions on this closed report

          Mark Waite added a comment - Tibor, I think you'll get better results with a new bug report rather than asking questions on this closed report

            olamy Olivier Lamy
            jamesdumay James Dumay
            Votes:
            40 Vote for this issue
            Watchers:
            61 Start watching this issue

              Created:
              Updated:
              Resolved: