java.lang.NoClassDefFoundError: com/atlassian/sal/api/ApplicationProperties

Joe July 16, 2014

Hello,

I downloaded and built jira-rest-java-client 2.0.0-m30 and Im using the code from

https://bitbucket.org/jaysee00/jrjc-example-client/src/e01e0da6d72e06aa21b0a8fe5c23d62b97192ca9/standalone/src/main/java/com/atlassian/jira/examples/Main.java?at=master

Im getting the following error:

**********************************************************************************************

* JIRA Java REST Client ('JRJC') example. *

* NOTE: Start JIRA using the Atlassian Plugin SDK before running this example. *

* (for example, use 'atlas-run-standalone --product jira --version 6.0 --data-version 6.0'.) *

**********************************************************************************************

Logging in to https://xxx.atlassian.netwith username 'xxx' and password 'xxx'

Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/sal/api/ApplicationProperties

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)

at HelloWorld.main(HelloWorld.java:38)

Caused by: java.lang.ClassNotFoundException: com.atlassian.sal.api.ApplicationProperties

at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

... 3 more

Any thoughts on what Im missing.

Best Regards,

Joe.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Max Dor December 9, 2018

In my pom.xml file, the following was missing within the dependencies section:

 

<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>3.2.0-abbce37</version>
<scope>provided</scope>
</dependency>

You can find the right version using this matrix but be aware that there is no 3.2.0 version in the public repository at the time of writing, only

3.2.0-abbce37
0 votes
Joe July 18, 2014

It was just missing jar files.. Used maven to download all dependencies and it worked..

HariK August 30, 2014

HI Joe, I'm having same issue. Can you please eloberate your solution please. I'm stuck with this

HariK August 30, 2014

Joe I'm using...below code and just having below .jars and Not having any Maven plugins. Is it really needed to have Maven plugins. what all I need to have. ?

atlassian-util-concurrent-2.4.1

jira-rest-java-client-2.0.0-m2

public JiraIssueAgent(JiraConfig config) throws URISyntaxException {

JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();

URI jiraServerUri = new URI(config.getUrl());

JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, config.getUsername(), config.getPassword());

init(restClient);

}

TAGS
AUG Leaders

Atlassian Community Events