{"record":{"id":"b07410b67a736797","repo":"quarkusio/quarkus","slug":"trying-to-use-a-storkclientrequestfilter-but-the-q","errorCode":null,"errorMessage":"Trying to use a StorkClientRequestFilter but the quarkus-smallrye-stork extension is missing, please add the extension.","messagePattern":"Trying to use a StorkClientRequestFilter but the quarkus-smallrye-stork extension is missing, please add the extension\\.","errorType":"exception","errorClass":"java.lang.IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/StorkClientRequestFilter.java","lineNumber":33,"sourceCode":"import org.jboss.resteasy.reactive.client.spi.ResteasyReactiveClientRequestFilter;\n\nimport io.smallrye.mutiny.Multi;\nimport io.smallrye.stork.Stork;\n\n@Priority(Priorities.AUTHENTICATION)\n@Provider\npublic class StorkClientRequestFilter implements ResteasyReactiveClientRequestFilter {\n\n    private static final Logger log = Logger.getLogger(StorkClientRequestFilter.class);\n\n    private final Stork stork;\n\n    public StorkClientRequestFilter() {\n        try {\n            stork = Stork.getInstance();\n\n            if (stork == null) {\n                throw new IllegalStateException(\n                        \"Trying to use a StorkClientRequestFilter but the quarkus-smallrye-stork extension is missing, please add the extension.\");\n            }\n        } catch (Exception e) {\n            throw new IllegalStateException(\n                    \"Trying to use a StorkClientRequestFilter but the quarkus-smallrye-stork extension is missing, please add the extension.\");\n        }\n    }\n\n    @Override\n    public void filter(ResteasyReactiveClientRequestContext requestContext) {\n        URI uri = requestContext.getUri();\n        if (uri != null && uri.getScheme() != null && uri.getScheme().startsWith(Stork.STORK)) {\n            String serviceName = uri.getHost();\n            if (serviceName == null) { // invalid URI\n                throw new IllegalArgumentException(\"Invalid REST Client URL used: '\" + uri + \"'\");\n            }\n\n            requestContext.suspend();","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/StorkClientRequestFilter.java#L15-L51","documentation":"StorkClientRequestFilter's constructor requires SmallRye Stork to be available via Stork.getInstance(); when it is null — or when instantiation throws, e.g. the Stork classes are absent — it throws this IllegalStateException telling you to add the quarkus-smallrye-stork extension. Stork is what resolves stork:// service URIs to real hosts.","triggerScenarios":"Using a stork:// URL (or registering StorkClientRequestFilter) in an application whose classpath lacks the quarkus-smallrye-stork extension, so Stork.getInstance() returns null or throws.","commonSituations":"Configuring quarkus.rest-client.<key>.uri=stork://myservice without adding the extension; switching from a direct http:// URL to service discovery; running tests/native builds where the extension dependency was omitted.","solutions":["Add the quarkus-smallrye-stork extension dependency to the project","Remove any stork:// URIs / StorkClientRequestFilter registration if service discovery is not wanted","If relying on a service-discovery implementation, also add its dependency (e.g. quarkus-stork-kubernetes-service-discovery or Consul)"],"exampleFix":"// before\n<dependency>\n  <groupId>io.quarkus</groupId><artifactId>quarkus-rest-client-reactive</artifactId>\n</dependency>\n// after\n<dependency>\n  <groupId>io.quarkus</groupId><artifactId>quarkus-rest-client-reactive</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId><artifactId>quarkus-smallrye-stork</artifactId>\n</dependency>","handlingStrategy":"fallback","validationCode":"// at startup\nboolean storkAvailable;\ntry {\n    storkAvailable = io.smallrye.mutiny.infrastructure.Infrastructure // placeholder\n        == null || Class.forName(\"io.smallrye.stork.Stork\") != null;\n} catch (ClassNotFoundException e) {\n    storkAvailable = false;\n}\nif (!storkAvailable) throw new IllegalStateException(\"Add quarkus-smallrye-stork before using stork:// URIs\");","typeGuard":"boolean isStorkConfigured(String uri) {\n    return uri != null && uri.startsWith(\"stork://\");\n}\n// if true, the extension dependency must be present","tryCatchPattern":"try {\n    filter = new StorkClientRequestFilter();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"quarkus-smallrye-stork\")) {\n        log.error(\"Add io.quarkus:quarkus-smallrye-stork to use stork:// URIs\");\n    } else throw e;\n}","preventionTips":["Add quarkus-smallrye-stork whenever any client URI uses stork://","Run a startup check that fails fast if Stork is required but absent","Keep service-discovery provider dependencies alongside the Stork extension"],"tags":["stork","rest-client-reactive","missing-dependency","service-discovery"],"backgroundTag":"missing-extension-dependency","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"}