Skip to main content

We are in process of building a quarkus application to integrate with docusign, however while getting the authtoken we get following error, can someone help?

 

ClientBuilder.newBuilder().sslContext(this.sslContext).withConfig(clientConfig).build() Docusign SDK(6.0.0) APIClient trying to set sslContext and getting below exception in Quarkus application. java.lang.UnsupportedOperationException: Specifying SSLContext is not supported at the moment at org.jboss.resteasy.reactive.client.impl.ClientBuilderImpl.sslContext(ClientBuilderImpl.java:105) at com.docusign.esign.client.ApiClient.buildHttpClient(ApiClient.java:1749) at com.docusign.esign.client.ApiClient.<init>(ApiClient.java:92)

Quarkus is not supporting to set SSLContext in org.jboss.resteasy.reactive.client.impl.ClientBuilderImpl https://quarkus.io/guides/rest-client#known-limitations.

 

how to create Quarkus application custom restclient and pass it to Docusign APIClient?

Yes, the error you're encountering is due to an incompatibility between the Docusign Java SDK (v6.0.0) and Quarkus's REST client implementation. Here's a breakdown of what's happening and how to resolve it:

🔍 Root Cause

You're seeing this:

java.lang.UnsupportedOperationException: Specifying SSLContext is not supported at the moment
at org.jboss.resteasy.reactive.client.impl.ClientBuilderImpl.sslContext(ClientBuilderImpl.java:105)

This tells us:

  • The ApiClient in Docusign SDK tries to set a custom SSLContext on a javax.ws.rs.client.ClientBuilder.

  • Quarkus, using RESTEasy Reactive, does not support setting an SSLContext on its ClientBuilder.

The DocuSign SDK assumes it can configure ClientBuilder directly, which works in most traditional JAX-RS implementations (like Jersey), but not in Quarkus with RESTEasy Reactive.

✅ Solutions / Workarounds

Option 1: Use RESTEasy Classic Instead of Reactive

If your app doesn't require RESTEasy Reactive, switch to RESTEasy Classic:

  1. In your pom.xml, replace RESTEasy Reactive with the classic JAX-RS client:

    <dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-rest-client</artifactId>
    </dependency>

    Remove (or avoid) this dependency if present:

    <dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-rest-client-reactive</artifactId>
    </dependency>
  2. This will ensure the underlying implementation supports ClientBuilder.sslContext().

Option 2: Use External Initialization of the Docusign Client

Instead of letting the SDK build the HTTP client (where it tries to set the SSL context), try this:

  1. Instantiate your own javax.ws.rs.client.Client with Quarkus-supported options (but without custom SSL).

  2. Pass that into the SDK or bypass the SSL context setup if it’s not required for your use case (i.e., you're not using mutual TLS or custom certs).

Note: This approach can be more complex if DocuSign SDK internally forces the use of its own ClientBuilder.

Option 3: Patch or Fork Docusign SDK

If neither of the above works and you must use RESTEasy Reactive, then:

  • Fork the SDK (or clone it locally).

  • Modify the call in ApiClient.buildHttpClient() to not set sslContext if running in Quarkus.

  • Repackage and use the modified version in your build.

Not ideal, but sometimes necessary if upstream doesn't support your environment yet.

Option 4: Downgrade DocuSign SDK

Try using DocuSign SDK v5.x, which might be less aggressive in trying to configure the client builder directly. Test for compatibility with your Quarkus version.

🧪 Bonus: Disable SSLContext in SDK (If Custom SSL Not Needed)

If you're not using a custom SSLContext, try this as a last resort:

ApiClient apiClient = new ApiClient();
apiClient.setHttpClientBuilder(ClientBuilder.newBuilder()); // Avoid .sslContext()

But note that this may not work cleanly with the current SDK unless you bypass buildHttpClient().

🧭 Recommendations

  • Easiest path: Switch to RESTEasy Classic.

  • Most robust: Use a supported JAX-RS implementation that works with ClientBuilder.sslContext() if you need that feature.

  • Longer-term: Raise an issue with DocuSign SDK and/or monitor this Quarkus issue for support of SSLContext in RESTEasy Reactive.

Let me know if you want help modifying your Quarkus dependencies or working around the SDK behavior.


Thank you very much for your response.


Reply