Getting below error while trying to login:
java.lang.NoSuchMethodError: org.apache.http.impl.client.cache.CacheConfig.setNeverCache1_0ResponsesWithQueryString(Z)V
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient.<init>(DefaultHttpClient.java:155)
at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:53)
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)
Am I missing any lib?
Community moderators have prevented the ability to post new answers.
posting as new answer to be able to use formatting.
Just checked the JRJC marketplace entry and see "REST Java Client for JIRA isn't formally supported.". So I do not know who to contact .
I suggest you to do not complicate your life and to do it as maven project. Here is a JRJC sample you can use as a quick start. Also you could need to look into JRJC sources.
If you really do not want to do it "easy maven way" and want to play with dependent jars, I added the latest 3.0.0 version of the jira-rest-java-client to a pom and generate dependency tree for you:
[INFO] +- com.atlassian.jira:jira-rest-java-client-core:jar:3.0.0:compile [INFO] | +- com.atlassian.jira:jira-rest-java-client-api:jar:3.0.0:compile [INFO] | | \- com.atlassian.httpclient:atlassian-httpclient-api:jar:0.13.2:compile [INFO] | | \- com.atlassian.httpclient:atlassian-httpclient-spi:jar:0.13.2:compile [INFO] | +- com.sun.jersey:jersey-client:jar:1.5:compile [INFO] | | \- com.sun.jersey:jersey-core:jar:1.5:compile [INFO] | +- com.sun.jersey:jersey-json:jar:1.5:compile [INFO] | | +- org.codehaus.jettison:jettison:jar:1.1:compile [INFO] | | | \- stax:stax-api:jar:1.0.1:compile [INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3:compile [INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.5.5:compile [INFO] | | \- org.codehaus.jackson:jackson-xc:jar:1.5.5:compile [INFO] | +- joda-time:joda-time:jar:1.6:compile [INFO] | +- com.atlassian.httpclient:atlassian-httpclient-apache-httpcomponents:jar:0.13.2:compile [INFO] | | +- com.atlassian.event:atlassian-event:jar:2.2.0:compile [INFO] | | +- org.apache.httpcomponents:httpasyncclient-cache:jar:4.0-beta3-atlassian-1:compile [INFO] | | +- org.apache.httpcomponents:httpclient-cache:jar:4.2.1-atlassian-2:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.2.1-atlassian-2:compile [INFO] | | +- org.apache.httpcomponents:httpasyncclient:jar:4.0-beta3-atlassian-1:compile [INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.2.2:compile [INFO] | | +- org.apache.httpcomponents:httpcore-nio:jar:4.2.2:compile [INFO] | | \- org.springframework:spring-context:jar:2.5.6:compile [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile [INFO] | +- com.atlassian.util.concurrent:atlassian-util-concurrent:jar:2.4.0-M9:compile [INFO] | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
And for sure there is "access JIRA REST API" on your own approach which is not complicated at all and in my opinion it's preferred for simple integration.
JRJC has dependency on apache httpclient and looks like your project brings duplicating dependency on version of apache httpclient. Please check your pom tree for apache httpclient and exclude conflicting version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for replying.
I'm not using maven and using following 2 libs related with httpclient in project:
httpclient-4.2.5
httpclient-cache-4.4.2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably you need some older version of the httpclient. Moreover just checked the pom.xml from the JRJC project (https://bitbucket.org/atlassian/jira-rest-java-client/src/232dd068a9c41a1b62f40b5712ab63d741cb177f/pom.xml?at=master&fileviewer=file-view-default) and I see it does not have appache httpclient dependency but some com.atlassian.httpclient. I recommend you to switch to maven to avoid troubles with dependencies. Other suggestion is to throw away JRJC and do direct calls to JIRA REST API: https://docs.atlassian.com/jira/REST/latest/. JRJC is just a wrapper around JIRA REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot use maven or JIRA REST API in my project and have already invested time in JRJC. Can you provide complete list of libraries with version numbers for JRJC implementation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Can you provide complete list of libraries You need to ask JRJC team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.