Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira REST API client - java.lang.ClassNotFoundException: javax.ws.rs.core.UriBuilder

Anbuchezhiyan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2024

Hi All,

Trying to implement Jira Rest API client using sprinBoot 3.x and Java 17 version.

Getting the below error while implementing , then came to know that JiraRestClient ( AsynchronousJiraRestClient ) still uses javax.ws.rs.core, but springboot 3.x  version moved to jakarta.ws.rs.core  hence the below error.

Is there any workaround or alterante approach to proceed further. Please suggest.

ERROR:

java.lang.ClassNotFoundException: javax.ws.rs.core.UriBuilder at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na] at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClient.(AsynchronousJiraRestClient.java:58) ~[jira-rest-java-client-core-5.2.4.jar:na] at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:37) ~[jira-rest-java-client-core-5.2.4.jar:na] at

 

1 answer

0 votes
Dustin Kanzlemar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 25, 2024

Did you ever get a solution to this? I am facing the exact same issue!

Edited: I just created a config.json like below and ran the generation with that config file to get it to work:

{

"modelPackage": "com.atlassian.jira.rest.client.model",

"apiPackage": "com.atlassian.jira.rest.client.api",

"invokerPackage": "com.atlassian.jira.rest.client",

"library": "jersey3",

"groupId": "com.atlassian.jira.rest",

"artifactId": "client",

"java11": "true",

"jakarta": "true"

}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events