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.
I've encountered the same error. Have you found a solution? If so, please share it with me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.