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?
Community moderators have prevented the ability to post new answers.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have struggled with the same problem and I came to this solution which works for me:
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-json</artifactId> <version>1.5</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> <version>1.9</version> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-api</artifactId> <version>2.0.0-m19</version> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-core</artifactId> <version>2.0.0-m19</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <!--version>r08</version --> <version>14.0-rc1</version> </dependency> <dependency> <groupId>org.codehaus.jettison</groupId> <artifactId>jettison</artifactId> <version>1.0.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.6.4</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> </dependencies>
And the Java code:
JiraRestClientFactory restClientFactory = new AsynchronousJiraRestClientFactory(); JiraRestClient restClient = restClientFactory.createWithBasicHttpAuthentication(uri, user, passsword);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing, this dependency list worked for me as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.