Hi there.
Using InteeliJ Idea, I can't add JRJC library to my maven project.
Added repository to my pom.xml as said here: https://ecosystem.atlassian.net/wiki/display/JRJC/Download
Added dependency com.atlassian.jira:jira-rest-java-client as said here: https://ecosystem.atlassian.net/wiki/display/JRJC/Tutorial
But Idea can't found this dependency of any version.
Where is this dependency?
BTW, I'm using JIRA 6.1 version.
Community moderators have prevented the ability to post new answers.
Hi Omickron,
It seems that artifact naming have been changed and now these could be used as a dependencies:
* jira-rest-java-client-api
* jira-rest-java-client-core
* jira-rest-java-client-plugin
The latest available version available for these components is 2.0.0-m25
As for jira-rest-java-client artifact, the latest available version is 2.0.0-m2.
--
Cheers, Ignat.
Thank's, Ignat! The compilation succeeds!
But when I run the project I've got an ClassNotFoundException in the row
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); SEVERE: Servlet.service() for servlet [servlet-module-container-servlet] in context with path [] threw exception [Servlet execution threw an exception] with root cause java.lang.ClassNotFoundException: com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
May be I have to import some additional components in atlassian-plugin.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Omickron,
I could not find the root of the problem from the stacktrace you have provided. Could you share a sample code repository where the bug is reproduced? E.g. pom.xml and the client class.
Alternatively, I have mentioned the bitbucket repository of the jira-rest-java-client project. You could clone the repository and browse the 'plugin' and 'test' modules and see the configuration of these. Also you could browse the java classes.
--
Cheers, Ignat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here it is, Ignat.
I haven't any ideas about what's wrong in my plugin.
CreateIssuesServlet - it's the class with 38-44 lines for creating an issue.
Thank you for help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Omickron,
Why do you use scope=provided?
Could you run this configuration?
<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-api</artifactId> <version>2.0.0-m25</version> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-core</artifactId> <version>2.0.0-m25</version> </dependency>
I just removed the "scope" section so Maven would use default compile scope.
--
Cheers, Ignat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've removed "provided" scope and got a huge stacktrace when starting JIRA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omickron,
Do you have the jira-rest-java-client-core included in your web application?
The AsynchronousJiraRestClientFactory is located in this jar.
If you need to refer to the JIRA REST client sources, it has public reposiotry on bitbuket:
https://bitbucket.org/atlassian/jira-rest-java-client
--
Cheers, Ignat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, Ignat, jira-rest-java-client-core is included in pom.xml
<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-api</artifactId> <version>2.0.0-m25</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-core</artifactId> <version>2.0.0-m25</version> <scope>provided</scope> </dependency>
And my IntelliJ Idea finds this class.
But when I start atlas-debug and try to enter the servlet which uses AsynchronousJiraRestClientFactory, I get this error.
I have already run mvn clean and restarted JIRA from blank. But the error still appears.
Should I have any "component-import" sections in my atlassian-plugin.xml to use Jira REST Client?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Omickron, looks like the logs have not been attached.
--
Cheers, Ignat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm.. Sorry, here it is
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ignat, looks like I used wrong version of jira-rest-java-client artifact.
This dependency works fine:
<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client</artifactId> <version>2.0.0-m2</version> </dependency>
Could you tell me, what is the latest version of this artifact?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Omickron,
Did you added atlassian repository to .m2/settings.xml ?
Could you provide logs of execution mvn package in your plugin folder?
--
Cheers, Ignat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(log.txt)
Yes, Ignat, I've added atlassian repository, but not in settings.xml - in pom.xml.
Here's log from mvn package, called from Idea
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.