{"record":{"id":"d482b117c378ae87","repo":"quarkusio/quarkus","slug":"the-application-is-using-a-stork-consul-provider-b","errorCode":null,"errorMessage":"The application is using a Stork Consul provider but does not depend on the `quarkus-jackson` extension. The Vert.x Consul client requires Jackson for JSON serialization. Without it, the application will fail at runtime with a NoClassDefFoundError. Add the `io.quarkus:quarkus-jackson` extension to the project.","messagePattern":"The application is using a Stork Consul provider but does not depend on the `quarkus-jackson` extension\\. The Vert\\.x Consul client requires Jackson for JSON serialization\\. Without it, the application will fail at runtime with a NoClassDefFoundError\\. Add the `io\\.quarkus:quarkus-jackson` extension to the project\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java","lineNumber":108,"sourceCode":"                                \"\\n - with Apache Maven, run: `./mvnw quarkus:add-extension -Dextensions=\\\"io.quarkus:quarkus-kubernetes-client\\\"`\"\n                                +\n                                \"\\n - or just add the `io.quarkus:quarkus-kubernetes-client` dependency to the project\");\n            }\n        }\n    }\n\n    /**\n     * This build step is the fix for <a href=\"https://github.com/quarkusio/quarkus/issues/54121\">#54121</a>.\n     * The Vert.x Consul client requires Jackson for JSON serialization. When a Consul Stork provider\n     * (service discovery or service registration) is on the classpath without the {@code quarkus-jackson}\n     * extension, the application fails at runtime with a cryptic {@code NoClassDefFoundError}.\n     */\n    @BuildStep\n    @Produce(AlwaysBuildItem.class)\n    void checkThatJacksonExtensionIsUsedWhenConsulIsOnTheClasspath(Capabilities capabilities) {\n        if (isConsulPresentAtRuntime()) {\n            if (!capabilities.isPresent(Capability.JACKSON)) {\n                throw new ConfigurationException(\n                        \"The application is using a Stork Consul provider but does not depend on the `quarkus-jackson` extension.\"\n                                + \" The Vert.x Consul client requires Jackson for JSON serialization.\"\n                                + \" Without it, the application will fail at runtime with a NoClassDefFoundError.\"\n                                + \" Add the `io.quarkus:quarkus-jackson` extension to the project.\");\n            }\n        }\n    }\n\n    @BuildStep\n    @Record(ExecutionTime.RUNTIME_INIT)\n    @Consume(AlwaysBuildItem.class)\n    @Consume(SyntheticBeansRuntimeInitBuildItem.class)\n    @Consume(StorkRegistrationConfigReadyBuildItem.class)\n    @Produce(StorkInitializedBuildItem.class)\n    void initializeStork(SmallRyeStorkRecorder storkRecorder, ShutdownContextBuildItem shutdown, VertxBuildItem vertx) {\n        storkRecorder.initialize(shutdown, vertx.getVertx());\n    }\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java#L90-L126","documentation":"This build-time check in SmallRyeStorkProcessor fails the Quarkus build when the application includes the Stork Consul provider (detected via QuarkusClassLoader.isClassPresentAtRuntime of the Consul discovery or registrar provider classes) but the quarkus-jackson capability is absent. The Vert.x Consul client that Stork delegates to serializes Consul catalog/KV payloads with Jackson, so without the extension the app compiles but crashes at runtime with NoClassDefFoundError. Quarkus surfaces it early as a ConfigurationException during deployment.","triggerScenarios":"Building a Quarkus app whose dependencies include io.smallrye.stork:stork-service-discovery-consul (or the Consul registrar artifact) while no dependency brings the Capability.JACKSON capability — e.g. only quarkus-rest-client-jackson is omitted and no other extension pulls in quarkus-jackson.","commonSituations":"Adding a smallrye-stork consul dependency directly in pom.xml without its Quarkus extension wrapper; migrating from Eureka/static-list Stork configs to Consul; trimming 'unused' extensions quarkus-jackson that was transitively present before; using Gradle/BOM updates that dropped the transitive jackson extension.","solutions":["Add the io.quarkus:quarkus-jackson extension to the project's build file (pom.xml dependencies or Gradle dependencies).","Verify with ./mvnw dependency:tree that quarkus-jackson is resolved once the Stork Consul artifacts are present.","If Consul was included by mistake, remove the stork-service-discovery-consul / consul registrar dependency and use a different Stork load-balancer/discovery type in configuration."],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-smallrye-stork</artifactId>\n</dependency>\n\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-smallrye-stork</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-jackson</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// pom.xml / build.gradle check before building\n// Maven: ./mvnw dependency:tree -Dincludes=io.quarkus:quarkus-jackson\n// fails/empty output means the extension is missing while stork-service-discovery-consul is present","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always add quarkus-jackson alongside any Stork Consul dependency","Prefer the quarkus-smallrye-stork extension route over raw smallrye-stork artifacts so capabilities are declared","Run a full build (not -Dquickly) in CI to catch ConfigurationException early"],"tags":["quarkus","stork","consul","missing-dependency","build-time"],"backgroundTag":"missing-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"}