JerseyJiraRestClientFactory doesn't exist

AUser January 9, 2013

Hi,

I am trying to get a instance of the JerseyJiraRestClientFactory class for hours now, but i doesn't work. I use Eclipse and all depedencies are also included.

As on the tutorial at https://ecosystem.atlassian.net/wiki/display/JRJC/Tutorial i should use the class JerseyJiraRestClientFactory in the package com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClientFactory. It's the first line and id doesn't work. I also didn't find any solution on the internet. Am i the only one with this probleme? The next class i can't import is NullProgressMonitor.

Has anybody a solution?

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Saugata Guha January 14, 2013

You are using the latest jar files, these do not have the above methods.
I could not figure out what to use instead of the above classes, but I went back to the
older jar files and got it to compile.

<pathelement location="../../../../../../local/sguha/java/jar/jira-rest-java-client-1.1-m02.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/jersey-bundle-1.16.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/jersey-client-1.16.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/jersey-core-1.16.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/jersey-apache-client-1.9.1.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/commons-httpclient-3.1.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/commons-logging-4.0.6.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/jettison-1.0.1.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/guava-14.0-rc1.jar"/>
<pathelement location="../../../../../../local/sguha/java/jar/commons-codec-1.7/commons-codec-1.7.jar"/>

These are the jar files I needed to compile & run the sample
Mind that jira-rest-java-client-2.0* does not work.
Guava is the google jars. Few of jars might be redundant.
jersey-client-1.9* might work.

Use jar finder to find the jars if you cannot find.
http://www.jarfinder.com/index.php/java

I still have https authentication problem.
I can access my jira repository with curl, using -k switch but with
java, it still does not work, do not know yet how to emulate the
"-k" switch in curl.

Hope this helps
Thanks

Saugata.

AUser January 14, 2013

Thank you! Now i also have it. But why do they offer a JAR, if the Classes in the tutorial aren't included? Maybe i didn't got it while reading or kind of that.

Now i have it. And I wrote my code with pure Jersey classes and parsed the results with Gson. I think this is the real karma :-D

Abubakkar March 2, 2015

Thank you guys! Even I had the same problem, trying to run a sample with 2.0 which never worked. Now I realized why it was not working from this answer. And seriously, why do they give jar if it does not have the classes mentioned in tutorial.?

3 votes
Jaroslaw September 17, 2013

I have struggled with the same problem and I came to this solution which works for me:

&lt;dependencies&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;junit&lt;/groupId&gt;
			&lt;artifactId&gt;junit&lt;/artifactId&gt;
			&lt;version&gt;4.8.2&lt;/version&gt;
			&lt;scope&gt;test&lt;/scope&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
			&lt;artifactId&gt;jersey-json&lt;/artifactId&gt;
			&lt;version&gt;1.5&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
			&lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
			&lt;version&gt;1.9&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
			&lt;artifactId&gt;jira-rest-java-client-api&lt;/artifactId&gt;
			&lt;version&gt;2.0.0-m19&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
			&lt;artifactId&gt;jira-rest-java-client-core&lt;/artifactId&gt;
			&lt;version&gt;2.0.0-m19&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;com.google.guava&lt;/groupId&gt;
			&lt;artifactId&gt;guava&lt;/artifactId&gt;
			&lt;!--version&gt;r08&lt;/version --&gt;
			&lt;version&gt;14.0-rc1&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;org.codehaus.jettison&lt;/groupId&gt;
			&lt;artifactId&gt;jettison&lt;/artifactId&gt;
			&lt;version&gt;1.0.1&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;
			&lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
			&lt;version&gt;1.6.4&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;commons-io&lt;/groupId&gt;
			&lt;artifactId&gt;commons-io&lt;/artifactId&gt;
			&lt;version&gt;2.4&lt;/version&gt;
		&lt;/dependency&gt;
	&lt;/dependencies&gt;

And the Java code:

JiraRestClientFactory restClientFactory = new AsynchronousJiraRestClientFactory();
JiraRestClient restClient = restClientFactory.createWithBasicHttpAuthentication(uri,
user, passsword);

0 votes
Vishal July 7, 2017

Following classes worked for me:

JiraRestClientFactory
IssueInputBuilder
IssueType
IssueInput
Promise<BasicIssue>
BasicIssue
Promise<Issue>
Issue
     

The issueKey in my case was BUG and the long id as verified from Jira admin was 10005L

pom.xml dependencies: jersey: 1.9 junit: 4.8.2 jira-rest-java-client-*: 3.0.0 guava: 14.0-rc1 commons-logging: 4.0.6

0 votes
Buminda Nawagamuwa February 10, 2016

Thanks for sharing, this dependency list worked for me as well.

0 votes
ayyappa m November 19, 2013

Thanks Jaroslaw. It really helped in compiling the source.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events