It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/a

Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory
at MyJiraClient.getJiraRestClient(MyJiraClient.java:67)
at MyJiraClient.<init>(MyJiraClient.java:25)
at Main.main(Main.java:13)
Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more

Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory

 

Here are my dependencies in gradle:

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'

// implementation 'com.google.code.gson:gson:2.8.5'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'

compileOnly 'com.atlassian.jira:jira-rest-java-client-core:5.0.4'
compileOnly 'com.atlassian.jira:jira-rest-java-client-api:5.0.4'
compileOnly 'com.atlassian.fugue:fugue:2.6.1'
}

Please help. Thanks! 

1 answer

1 accepted

1 vote
Answer accepted
DPK J Community Leader Sep 12, 2019

In your gradle dependencies, replace this

compileOnly 'com.atlassian.jira:jira-rest-java-client-core:5.0.4'
compileOnly 'com.atlassian.jira:jira-rest-java-client-api:5.0.4'
compileOnly 'com.atlassian.fugue:fugue:2.6.1'

 with,

compile 'com.atlassian.jira:jira-rest-java-client-core:5.0.4'
compile 'com.atlassian.jira:jira-rest-java-client-api:5.0.4'
compile 'com.atlassian.fugue:fugue:2.6.1'

I ended up getting this error:

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find com.atlassian.jira:jira-rest-java-client-core:5.0.4.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/atlassian/jira/jira-rest-java-client-core/5.0.4/jira-rest-java-client-core-5.0.4.pom
- https://repo.maven.apache.org/maven2/com/atlassian/jira/jira-rest-java-client-core/5.0.4/jira-rest-java-client-core-5.0.4.jar
Required by:
project :
> Could not find com.atlassian.jira:jira-rest-java-client-api:5.0.4.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/atlassian/jira/jira-rest-java-client-api/5.0.4/jira-rest-java-client-api-5.0.4.pom
- https://repo.maven.apache.org/maven2/com/atlassian/jira/jira-rest-java-client-api/5.0.4/jira-rest-java-client-api-5.0.4.jar
Required by:
project :
> Could not find com.atlassian.fugue:fugue:2.6.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/atlassian/fugue/fugue/2.6.1/fugue-2.6.1.pom
- https://repo.maven.apache.org/maven2/com/atlassian/fugue/fugue/2.6.1/fugue-2.6.1.jar
Required by:
project :

DPK J Community Leader Sep 12, 2019

Do you have,

repositories {
    jcenter()
    mavenCentral()
}

in you build.gradle file, if not please add and try again.

Forgot to let you know but it works. Thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

How InVision centralized their tools and scaled their remote team with Atlassian and Slack

Hi Atlassian Community, We recently published a case study that we thought you might be interested in. Learn about how InVision built their fully remote company’s culture using Atlassian and Slack ...

236 views 0 1
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you