quarkusio/quarkus · error · IllegalStateException

No HealthCheckResponseProvider implementation found.

Error message

No HealthCheckResponseProvider implementation found.

What it means

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.

Source

Thrown at extensions/smallrye-health/deployment/src/main/java/io/quarkus/smallrye/health/deployment/SmallRyeHealthProcessor.java:185

        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(STARTUP, BuiltinScope.SINGLETON.getName()));
        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(HEALTH_GROUP, BuiltinScope.SINGLETON.getName()));
        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(HEALTH_GROUPS, BuiltinScope.SINGLETON.getName()));
        beanDefiningAnnotation.produce(new BeanDefiningAnnotationBuildItem(WELLNESS, BuiltinScope.SINGLETON.getName()));

        // Add additional beans
        additionalBean.produce(new AdditionalBeanBuildItem(QuarkusAsyncHealthCheckFactory.class));
        excludedTypes.produce(new ExcludedTypeBuildItem(AsyncHealthCheckFactory.class.getName()));
        additionalBean.produce(new AdditionalBeanBuildItem(SmallRyeHealthReporter.class));

        // Make ArC discover @HealthGroup as a qualifier
        additionalBean.produce(new AdditionalBeanBuildItem(HealthGroup.class));

        // Discover and register the HealthCheckResponseProvider
        Set<String> providers = ServiceUtil.classNamesNamedIn(getClass().getClassLoader(),
                "META-INF/services/" + HealthCheckResponseProvider.class.getName());

        if (providers.isEmpty()) {
            throw new IllegalStateException("No HealthCheckResponseProvider implementation found.");
        } else if (providers.size() > 1) {
            throw new IllegalStateException(
                    String.format("Multiple HealthCheckResponseProvider implementations found: %s", providers));
        }

        final String provider = providers.iterator().next();
        final Class<? extends HealthCheckResponseProvider> responseProvider = (Class<? extends HealthCheckResponseProvider>) Class
                .forName(provider, true, Thread.currentThread().getContextClassLoader());
        recorder.registerHealthCheckResponseProvider(responseProvider);
    }

    @BuildStep
    public void defineHealthRoutes(BuildProducer<RouteBuildItem> routes,
            BeanArchiveIndexBuildItem beanArchiveIndex,
            NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,
            SmallRyeHealthBuildTimeConfig healthConfig) {
        IndexView index = beanArchiveIndex.getIndex();

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure io.smallrye:smallrye-health (CDI implementation) is on the classpath — normally pulled transitively by quarkus-smallrye-health
  2. Remove exclusions of smallrye-health transitive dependencies
  3. Rebuild with the standard quarkus-smallrye-health extension instead of ad-hoc SmallRye jars
  4. Check dependency:tree for smallrye-health and its services descriptor

Example fix

// before — exclusion removes the provider
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-health</artifactId>
  <exclusions>
    <exclusion>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-health</artifactId>
    </exclusion>
  </exclusions>
</dependency>

// after — no exclusion
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-health</artifactId>
</dependency>
Defensive patterns

Strategy: validation

Validate before calling

// Verify a provider is discoverable before building
Set<String> providers = ServiceUtil.classNamesNamedIn(getClass().getClassLoader(),
        "META-INF/services/org.eclipse.microprofile.health.HealthCheckResponseProvider");
if (providers.isEmpty()) {
    throw new IllegalStateException("Add io.smallrye:smallrye-health to the classpath");
}

Try / catch

try {
    quarkusBuild();
} catch (IllegalStateException e) {
    if (e.getMessage().contains("No HealthCheckResponseProvider")) {
        throw new IllegalStateException("Classpath lacks smallrye-health CDI jar", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/ba1d78be6e6ef9f6. Report an issue: GitHub.