I'm trying to implement some basic functionality with the newest DocuSignApi for Java (version 2.6.2). I'm currently just trying to get the JWT Authorization Flow working. Here's the code:
ApiClient apiClient = new ApiClient();
this.apiClient.configureJWTAuthorizationFlow(this.adminProperties.getRsaPublicKey(), this.adminProperties
.getRsaPrivateKey(), this.adminProperties.getoAuthBaseUrl(), this.adminProperties.getIntegratorKey(),
this.adminProperties.getImpersonatedUserGuid(), TOKEN_EXPIRATION_IN_SECONDS);
On the `ApiClient.configureJWTAuthorizationFlow(...) call above I'm receiving the following runtime error:
Caused by: java.lang.ClassNotFoundException: com.auth0.jwt.exceptions.JWTCreationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I do not receive any compilation errors, just to be clear.
I have added this to my project pom as indicated from the DocuSignApi Java Wiki:
<dependency>
<groupId>com.docusign</groupId>
<artifactId>docusign-esign-java</artifactId>
<version>2.6.2</version>
</dependency>
Now I'm also using a Maven archetype that is pulling in a ton of other jars that are used with all of my company's projects and are needed for other functionality in my application. I can see that my effective pom is pulling in this version of java-jwt & spring-security-jwt:
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
<version>1.0.8.RELEASE</version>
</dependency>
I also noticed that one of the dependencies listed on the DocuSignApi Java Wiki is as such:
org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2
I suspect that my error may have something to do with a version conflict between the JWT 2.2.0 in my archetype and the required 1.0.2 version from DocuSign.
My questions are
- Is my error indeed caused by a version conflict with the JWT jar?
- If so, what's the best way to remedy this problem? Can the DocuSignApi work with a newer version of JWT like I have?
Thank you for your time!