Hi All,
Trying to implement Jira Rest API client using sprinBoot 3.x and Java 17 version.
Getting the below error while implementing , 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
The only solution for now is to downgrade transitive dependency to use a old javax package instead of a new jakarta package.
In Gradle build.gradle:
dependencies {
implementation("com.atlassian.jira:jira-rest-java-client-core:5.2.7") {
exclude(group = "org.glassfish.jersey.core", module = "jersey-common")
}
implementation("org.glassfish.jersey.core:jersey-common:2.35")
compileOnly("io.atlassian.fugue:fugue:5.0.1")
}
Solution was inspired by the answer here(*) , but updated to the latest working packages versions.