{"record":{"id":"de1f1c0546354d2e","repo":"quarkusio/quarkus","slug":"rest-client-interface-clazz-was-not-index","errorCode":null,"errorMessage":"REST client interface: \" + clazz + \" was not indexed at build time. See https://quarkus.io/guides/cdi-reference#bean_discovery for information on how to index the module that contains it.","messagePattern":"REST client interface: \" \\+ clazz \\+ \" was not indexed at build time\\. See https://quarkus\\.io/guides/cdi-reference#bean_discovery for information on how to index the module that contains it\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java","lineNumber":35,"sourceCode":"    final Map<Class<?>, BiFunction<WebTarget, List<ParamConverterProvider>, ?>> clientProxies;\n    private final Map<Class<?>, String> failures;\n\n    public ClientProxies(Map<Class<?>, BiFunction<WebTarget, List<ParamConverterProvider>, ?>> clientProxies,\n            Map<Class<?>, String> failures) {\n        this.clientProxies = clientProxies;\n        this.failures = failures;\n    }\n\n    public <T> T get(Class<?> clazz, WebTarget webTarget, List<ParamConverterProvider> providers) {\n        BiFunction<WebTarget, List<ParamConverterProvider>, ?> function = clientProxies.get(clazz);\n        if (function == null) {\n            String failure = failures.get(clazz);\n            if (failure != null) {\n                throw new InvalidRestClientDefinitionException(\n                        \"Failed to generate client for class \" + clazz + \" : \" + failure);\n            } else {\n                if (hasRestClientAnnotations(clazz)) {\n                    throw new IllegalStateException(\"REST client interface: \" + clazz\n                            + \" was not indexed at build time. See https://quarkus.io/guides/cdi-reference#bean_discovery for information on how to index the module that contains it.\");\n                } else {\n                    throw new IllegalArgumentException(\"Not a REST client interface: \" + clazz + \". No @Path annotation \" +\n                            \"found on the class or any methods of the interface and no HTTP method annotations \" +\n                            \"(@POST, @PUT, @GET, @HEAD, @DELETE, etc) found on any of the methods\");\n                }\n            }\n        }\n        //noinspection unchecked\n        return (T) function.apply(webTarget, providers);\n    }\n\n    private boolean hasRestClientAnnotations(Class<?> clazz) {\n        for (Annotation annotation : clazz.getAnnotations()) {\n            if (isRestClientAnnotation(annotation)) {\n                return true;\n            }\n        }","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java#L17-L53","documentation":"The class looks like a REST client (it carries jakarta.ws.rs or MicroProfile REST client annotations) but no proxy was generated for it because it was not part of the Jandex index at build time. ClientProxies.get() performs this annotation check at runtime when the proxy is missing and directs the developer to Quarkus bean-discovery/indexing docs.","triggerScenarios":"Calling ClientProxies.get()/QuarkusRestClientBuilder for an interface annotated with @Path, @RegisterRestClient, etc. that lives in a dependency JAR or module not indexed by Jandex at build time.","commonSituations":"REST client interfaces in external library JARs without a Jandex index (no beans.xml/index file, or not added via quarkus.index-dependency.*); multi-module projects where the API module isn't indexed; dev-mode hot changes adding a new client interface without re-indexing.","solutions":["Add a Jandex index to the library containing the interface (jandex-maven-plugin `jandex` goal, or an empty META-INF/beans.xml)","Register the external dependency for indexing: quarkus.index-dependency.<name>.group-id/artifact-id properties","Ensure the interface is in a module included in the application build, then rebuild","As a last resort use QuarkusRestClientBuilder manually — but indexing is the correct fix"],"exampleFix":"// before (unindexed lib) — no action\n// after (pom.xml of the library or app)\n<plugin>\n  <groupId>io.smallrye</groupId>\n  <artifactId>jandex-maven-plugin</artifactId>\n  <executions><execution><goals><goal>jandex</goal></goals></execution></executions>\n</plugin>\n// or application.properties:\n// quarkus.index-dependency.my-api.group-id=com.example\n// quarkus.index-dependency.my-api.artifact-id=my-api","handlingStrategy":"validation","validationCode":"// fail fast at startup if the interface wasn't indexed\nQuarkusRestClientBuilder.newBuilder().build(MyClient.class); // throws here, not at first call","typeGuard":null,"tryCatchPattern":"try {\n    MyClient c = QuarkusRestClientBuilder.newBuilder().build(MyClient.class);\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"was not indexed at build time\")) {\n        throw new IllegalStateException(\"Add jandex-maven-plugin or quarkus.index-dependency.* for \" + MyClient.class, e);\n    }\n    throw e;\n}","preventionTips":["Add jandex-maven-plugin (or META-INF/beans.xml) to libraries containing REST client interfaces","Register external dependencies with quarkus.index-dependency.<name>.group-id/artifact-id","Keep REST client interfaces in the application's indexed modules when possible","Verify indexing with a build/startup check rather than at first request"],"tags":["jandex","indexing","rest-client","build-time","quarkus"],"backgroundTag":"class-not-indexed-at-build-time","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}