quarkusio/quarkus · error · UnsupportedOperationException

Specifying SSLContext is not supported at the moment

Error message

Specifying SSLContext is not supported at the moment

What it means

The RESTEasy Reactive client does not implement the JAX-RS ClientBuilder.sslContext() hook; it deliberately throws UnsupportedOperationException with this message. Custom SSL contexts must instead be configured through the keyStore/trustStore setters or Quarkus TLS registry configuration.

Source

Thrown at independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientBuilderImpl.java:121

    public ClientBuilderImpl() {
        configuration = new ConfigurationImpl(RuntimeType.CLIENT);
    }

    @Override
    public ClientBuilder withConfig(Configuration config) {
        this.configuration = new ConfigurationImpl(config);
        return this;
    }

    public ClientBuilder tlsConfig(TlsConfig tlsConfig) {
        this.tlsConfig = tlsConfig;
        return this;
    }

    @Override
    public ClientBuilder sslContext(SSLContext sslContext) {
        // TODO
        throw new UnsupportedOperationException("Specifying SSLContext is not supported at the moment");
    }

    @Override
    public ClientBuilder keyStore(KeyStore keyStore, char[] password) {
        this.keyStore = keyStore;
        this.keystorePassword = password;
        return this;
    }

    @Override
    public ClientBuilder trustStore(KeyStore trustStore) {
        return trustStore(trustStore, null);
    }

    public ClientBuilder trustStore(KeyStore trustStore, char[] password) {
        this.trustStore = trustStore;
        this.trustStorePassword = password;
        return this;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Use keyStore(keyStore, password) and/or trustStore(trustStore) on the builder instead of sslContext()
  2. Configure TLS via Quarkus properties (quarkus.tls.key-store/trust-store or quarkus.rest-client.<name>.key-store/trust-store) and build the client from config
  3. If you truly need a custom SSLContext, build the underlying Vert.x HttpClient options yourself or fall back to the classic RESTEasy client implementation
  4. Check the extension version — support may exist in newer releases; otherwise track the TODO in ClientBuilderImpl

Example fix

// before
Client client = ClientBuilder.newBuilder().sslContext(sslContext).build();

// after
Client client = ClientBuilder.newBuilder()
        .keyStore(keyStore, keyStorePassword)
        .trustStore(trustStore)
        .build();
Defensive patterns

Strategy: fallback

Try / catch

try {
    builder = builder.sslContext(ctx);
} catch (UnsupportedOperationException e) {
    builder = builder.keyStore(keyStore, keyPass).trustStore(trustStore);
}

Prevention

When it happens

Trigger: Calling ClientBuilder.newBuilder().sslContext(mySslContext) or QuarkusRestClientBuilder.sslContext(...) when programmatically building a client.

Common situations: Migrating code written for the classic RESTEasy client or Jersey where sslContext() works; trying to set custom trust material or client certs via SSLContext; porting a MicroProfile REST Client programmatic builder from another implementation.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/67a93b92958e9078. Report an issue: GitHub.