{"record":{"id":"ba1d78be6e6ef9f6","repo":"quarkusio/quarkus","slug":"no-healthcheckresponseprovider-implementation-foun","errorCode":null,"errorMessage":"No HealthCheckResponseProvider implementation found.","messagePattern":"No HealthCheckResponseProvider implementation found\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-health/deployment/src/main/java/io/quarkus/smallrye/health/deployment/SmallRyeHealthProcessor.java","lineNumber":185,"sourceCode":"        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(STARTUP, BuiltinScope.SINGLETON.getName()));\n        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(HEALTH_GROUP, BuiltinScope.SINGLETON.getName()));\n        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(HEALTH_GROUPS, BuiltinScope.SINGLETON.getName()));\n        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(WELLNESS, BuiltinScope.SINGLETON.getName()));\n\n        // Add additional beans\n        additionalBean.produce(new AdditionalBeanBuildItem(QuarkusAsyncHealthCheckFactory.class));\n        excludedTypes.produce(new ExcludedTypeBuildItem(AsyncHealthCheckFactory.class.getName()));\n        additionalBean.produce(new AdditionalBeanBuildItem(SmallRyeHealthReporter.class));\n\n        // Make ArC discover @HealthGroup as a qualifier\n        additionalBean.produce(new AdditionalBeanBuildItem(HealthGroup.class));\n\n        // Discover and register the HealthCheckResponseProvider\n        Set<String> providers = ServiceUtil.classNamesNamedIn(getClass().getClassLoader(),\n                \"META-INF/services/\" + HealthCheckResponseProvider.class.getName());\n\n        if (providers.isEmpty()) {\n            throw new IllegalStateException(\"No HealthCheckResponseProvider implementation found.\");\n        } else if (providers.size() > 1) {\n            throw new IllegalStateException(\n                    String.format(\"Multiple HealthCheckResponseProvider implementations found: %s\", providers));\n        }\n\n        final String provider = providers.iterator().next();\n        final Class<? extends HealthCheckResponseProvider> responseProvider = (Class<? extends HealthCheckResponseProvider>) Class\n                .forName(provider, true, Thread.currentThread().getContextClassLoader());\n        recorder.registerHealthCheckResponseProvider(responseProvider);\n    }\n\n    @BuildStep\n    public void defineHealthRoutes(BuildProducer<RouteBuildItem> routes,\n            BeanArchiveIndexBuildItem beanArchiveIndex,\n            NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,\n            SmallRyeHealthBuildTimeConfig healthConfig) {\n        IndexView index = beanArchiveIndex.getIndex();\n","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-health/deployment/src/main/java/io/quarkus/smallrye/health/deployment/SmallRyeHealthProcessor.java#L167-L203","documentation":"During the SmallRye Health extension build step, Quarkus discovers HealthCheckResponseProvider implementations via the standard ServiceLoader file META-INF/services/org.eclipse.microprofile.health.HealthCheckResponseProvider. If none is on the deployment classpath, the build fails with this IllegalStateException, because the CDI bridge for the response builder requires exactly one provider.","triggerScenarios":"Building an app with the health extension when no jar provides META-INF/services/org.eclipse.microprofile.health.HealthCheckResponseProvider — typically the smallrye-health CDI runtime jar is missing from the deployment classpath.","commonSituations":"Manually managed dependency trees excluding io.smallrye:smallrye-health; dependency exclusions stripping it; a custom BOM pinning an incomplete SmallRye Health version; using quarkus-smallrye-health with an incompatible/older smallrye-health artifact.","solutions":["Ensure io.smallrye:smallrye-health (CDI implementation) is on the classpath — normally pulled transitively by quarkus-smallrye-health","Remove exclusions of smallrye-health transitive dependencies","Rebuild with the standard quarkus-smallrye-health extension instead of ad-hoc SmallRye jars","Check dependency:tree for smallrye-health and its services descriptor"],"exampleFix":"// before — exclusion removes the provider\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-smallrye-health</artifactId>\n  <exclusions>\n    <exclusion>\n      <groupId>io.smallrye</groupId>\n      <artifactId>smallrye-health</artifactId>\n    </exclusion>\n  </exclusions>\n</dependency>\n\n// after — no exclusion\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-smallrye-health</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// Verify a provider is discoverable before building\nSet<String> providers = ServiceUtil.classNamesNamedIn(getClass().getClassLoader(),\n        \"META-INF/services/org.eclipse.microprofile.health.HealthCheckResponseProvider\");\nif (providers.isEmpty()) {\n    throw new IllegalStateException(\"Add io.smallrye:smallrye-health to the classpath\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    quarkusBuild();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"No HealthCheckResponseProvider\")) {\n        throw new IllegalStateException(\"Classpath lacks smallrye-health CDI jar\", e);\n    }\n    throw e;\n}","preventionTips":["Do not exclude smallrye-health transitives from quarkus-smallrye-health","Use the Quarkus BOM for consistent SmallRye versions","Add a build-time smoke test for health extension apps","Verify META-INF/services files survive your shading/relocation steps"],"tags":["health","build-time","serviceloader","quarkus"],"backgroundTag":"missing-service-provider","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"}