Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
DocuSign eSignature API SDK: java.lang.NoClassDefFoundError errors.
I am trying to implement DocuSign's eSignature REST API by using Java SDK. I am following instructions here:
https://developers.docusign.com/docs/esign-rest-api/sdks/java/setup-and-configuration/
I created a java project, converted it to Maven, installed DocuSign's SDK (docusign-esign-java-4.3.0.jar) through Maven and wrote this piece of code:
package myPackage;
import com.docusign.esign.client.ApiClient;
public class signStuff{
public static void main(String[] args) {
try {
// error happens on the next line
ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
When I run this code I've been getting 3 types of error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/glassfish/jersey/media/multipart/BodyPart
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/util/ISO8601DateFormat
Exception in thread "main" java.lang.NoClassDefFoundError: jakarta/ws/rs/core/GenericType
My code does not go into catch
, it just crushes on new ApiClient(...)
line.
- Why am I getting these errors? (Could I be missing some dependencies? DocuSign documentation does not seem to say anything about that).
- What can I do to fix these error?
- Why am I getting different errors on different runs? (Could it be because of multithreading?).
1 answer
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
Vanity Slug ❤️ | (no comment) | Jun 16, 2023 at 13:24 |
I am new to Maven so I did not know that I have to "Update Project".
If you are using Eclipse editor then you can right click on the project --> "Maven" --> "Update Project" to install dependencies to fix this problem.
2 comment threads