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
- Use keyStore(keyStore, password) and/or trustStore(trustStore) on the builder instead of sslContext()
- 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
- If you truly need a custom SSLContext, build the underlying Vert.x HttpClient options yourself or fall back to the classic RESTEasy client implementation
- 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
- Never use sslContext() with the RESTEasy Reactive client; go straight to keyStore/trustStore
- Centralize client construction in one factory so unsupported builders fail fast in one place
- Configure TLS via quarkus.tls.* / quarkus.rest-client.<name>.* properties instead of programmatic SSL
- Pin and review client library versions when porting from classic RESTEasy/Jersey
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
- Specifying HostnameVerifier is not supported at the moment
- Trust options have already been set
- Key cert options have already been set
- Failed to create Keycloak Admin client SSLContext
- Could not configure MongoDB client with TLS registry
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/67a93b92958e9078.
Report an issue: GitHub.