Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JRJC - not able to login

ankugarg November 1, 2015

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?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2015

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 sad.

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.

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2015

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.

ankugarg November 2, 2015

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

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2015

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.

ankugarg November 2, 2015

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.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2015

> Can you provide complete list of libraries You need to ask JRJC team.

ankugarg November 3, 2015

Can you help me forwarding this query to JRJC team or provide their email id?

TAGS
AUG Leaders

Atlassian Community Events