{"record":{"id":"dccf7946407acab8","repo":"quarkusio/quarkus","slug":"expected-a-clientinvocationbuilder-dccf79","errorCode":null,"errorMessage":"Expected a ClientInvocationBuilder","messagePattern":"Expected a ClientInvocationBuilder","errorType":"exception","errorClass":"ProcessingException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-classic/resteasy-mutiny-common/runtime/src/main/java/io/quarkus/resteasy/mutiny/common/runtime/UniInvokerProvider.java","lineNumber":26,"sourceCode":"import jakarta.ws.rs.client.SyncInvoker;\n\nimport org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder;\n\npublic class UniInvokerProvider implements RxInvokerProvider<UniRxInvoker> {\n\n    @Override\n    public boolean isProviderFor(Class<?> clazz) {\n        return UniRxInvoker.class.equals(clazz);\n    }\n\n    @Override\n    public UniRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {\n        if (syncInvoker instanceof ClientInvocationBuilder) {\n            ClientInvocationBuilder builder = (ClientInvocationBuilder) syncInvoker;\n            CompletionStageRxInvoker completionStageRxInvoker = builder.rx();\n            return new UniRxInvokerImpl(completionStageRxInvoker);\n        } else {\n            throw new ProcessingException(\"Expected a ClientInvocationBuilder\");\n        }\n    }\n}\n","sourceCodeStart":8,"sourceCodeEnd":30,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-classic/resteasy-mutiny-common/runtime/src/main/java/io/quarkus/resteasy/mutiny/common/runtime/UniInvokerProvider.java#L8-L30","documentation":"UniInvokerProvider is a RxInvokerProvider for Uni in Quarkus' RESTEasy client integration. getRxInvoker only supports RESTEasy's ClientInvocationBuilder because it needs builder.rx() to obtain the CompletionStageRxInvoker underneath. If the SyncInvoker passed by the client runtime is not a ClientInvocationBuilder, it throws this ProcessingException, meaning the Uni reactive invoker is being requested from a non-RESTEasy client.","triggerScenarios":"Requesting UniRxInvoker via syncInvoker.rx(UniRxInvoker.class) (or provider registration resolving to UniInvokerProvider) where the SyncInvoker supplied by the JAX-RS client is not org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.","commonSituations":"Mixing the Quarkus REST client with a different JAX-RS Client implementation on the classpath; using the mutiny Uni invoker extension without the RESTEasy client runtime; proxying or decorating the client request so the concrete builder type is lost.","solutions":["Use the RESTEasy Classic Quarkus client (rest-client / resteasy-client) so the invoker is a ClientInvocationBuilder.","Remove conflicting JAX-RS client implementations from the classpath so the RESTEasy client is the resolved provider.","Build invocations from a ResteasyClient WebTarget rather than wrapping the request, preserving the concrete ClientInvocationBuilder type."],"exampleFix":"// before (wrong stack)\nClient client = ClientBuilder.newClient(); // Jersey-like impl\nclient.target(url).request().rx(UniRxInvoker.class); // ProcessingException\n\n// after (RESTEasy client)\nResteasyClient client = (ResteasyClient) ClientBuilder.newBuilder().build();\nUni<String> uni = client.target(url).request().rx(UniRxInvoker.class).get();","handlingStrategy":"type-guard","validationCode":"if (!(syncInvoker instanceof ClientInvocationBuilder)) {\n    throw new IllegalStateException(\"UniRxInvoker requires the RESTEasy client; got \" + syncInvoker.getClass());\n}","typeGuard":"static boolean supportsUni(SyncInvoker invoker) {\n    return invoker instanceof org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder;\n}","tryCatchPattern":"try {\n    UniRxInvoker invoker = webTarget.request().rx(UniRxInvoker.class);\n} catch (ProcessingException e) {\n    if (e.getMessage().contains(\"Expected a ClientInvocationBuilder\")) {\n        throw new IllegalStateException(\"Ensure the RESTEasy client provider is used (rest-client/quarkus resteasy-client)\", e);\n    }\n    throw e;\n}","preventionTips":["Keep only one JAX-RS client implementation on the classpath","Add the quarkus rest-client / resteasy-client extension when using the Uni invoker","Create clients via ResteasyClientBuilder so request() yields ClientInvocationBuilder"],"tags":["resteasy","client","reactive","mutiny","type-mismatch"],"backgroundTag":"incompatible-client-invoker-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}