We have recently upgraded spring boot version from 2.7.0 to 3.2.2 and Java version to 21 But after upgrading the spring version, the Dropbox API has started failing on fetching Client details at
ApiClient apiClient = Configuration.getDefaultApiClient();
Error
jakarta.servlet.ServletException: Handler dispatch failed: java.lang.LinkageError: ClassCastException: attempting to castjar:file:/.m2/repository/org/jboss/spec/javax/ws/rs/jboss-jaxrs-api_2.1_spec/2.0.1.Final/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/.m2/repository/org/jboss/spec/javax/ws/rs/jboss-jaxrs-api_2.1_spec/2.0.1.Final/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar!/javax/ws/rs/client/ClientBuilder.class
Below are the maven dependencies for jaxrs and dropbox
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.15.6.FINAL</version>
</dependency>
<dependency>
<groupId>com.dropbox.sign</groupId>
<artifactId>dropbox-sign</artifactId>
<version>1.2.0</version>
</dependency>
Currently we are not able to resolve this issue, though we have tried with different version of dropbox and jaxrs.
We would be really grateful if someone can help us in right direction here.
Change the version of Spring boot 3.2.2 to 3.0.0