quarkusio/quarkus · error · IllegalArgumentException

Enabling Hibernate Search management endpoints, while there

Error message

Enabling Hibernate Search management endpoints, while there are no Vert.x HTTP capabilities in the application, is not allowed.

What it means

Hibernate Search management endpoints (e.g. for mass indexing / reindexing over HTTP) are registered as Vert.x HTTP management routes at build time. If the quarkus-hibernate-search-orm-elasticsearch management feature is enabled but the application has no vertx-http capability (no quarkus-vertx-http / quarkus-vertx extension present), createManagementRoutes throws an IllegalArgumentException because there is no HTTP layer to attach the routes to.

Source

Thrown at extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/deployment/HibernateSearchElasticsearchProcessor.java:345

                                            schemaManagementStrategyPropertyKey, forcedValue);
                                    return Map.of(schemaManagementStrategyPropertyKey, forcedValue);
                                } else {
                                    return Map.of();
                                }
                            }));
                }
            }
        }
    }

    @Record(ExecutionTime.RUNTIME_INIT)
    @BuildStep(onlyIf = HibernateSearchManagementEnabled.class)
    void createManagementRoutes(Capabilities capabilities,
            BuildProducer<RouteBuildItem> routes,
            HibernateSearchElasticsearchRecorder recorder,
            HibernateSearchElasticsearchBuildTimeConfig hibernateSearchElasticsearchBuildTimeConfig) {
        if (capabilities.isMissing(Capability.VERTX_HTTP)) {
            throw new IllegalArgumentException(
                    "Enabling Hibernate Search management endpoints, while there are no Vert.x HTTP capabilities " +
                            "in the application, is not allowed.");
        }
        String managementRootPath = hibernateSearchElasticsearchBuildTimeConfig.management().rootPath();

        routes.produce(RouteBuildItem.newManagementRoute(
                managementRootPath + (managementRootPath.endsWith("/") ? "" : "/") + "reindex")
                .withRoutePathConfigKey("quarkus.hibernate-search-orm.management.root-path")
                .withRequestHandler(recorder.managementHandler())
                .displayOnNotFoundPage()
                .build());
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Add quarkus-vertx-http (e.g. via quarkus-rest or the quarkus-vertx-http artifact) so the management routes have an HTTP server
  2. If HTTP management is not needed, set quarkus.hibernate-search-orm.management.enabled=false or remove the management config

Example fix

// before (pom.xml: no vertx-http)
quarkus.hibernate-search-orm.management.enabled=true
// after: add dependency
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-vertx-http</artifactId>
</dependency>
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the vertx-http extension is on the classpath before enabling management:
try (var is = getClass().getClassLoader()
    .getResourceAsStream("io/quarkus/vertx/http/runtime/VertxHttpRecorder.class")) {
  if (is == null) {
    throw new IllegalStateException("Add quarkus-vertx-http before enabling Hibernate Search management endpoints");
  }
}

Prevention

When it happens

Trigger: At build time: hibernate-search management endpoints are enabled (quarkus.hibernate-search-orm.management.enabled=true, activating HibernateSearchManagementEnabled condition) while the application lacks the Vert.x HTTP capability (capabilities.isMissing(Capability.VERTX_HTTP)).

Common situations: Enabling management endpoints in a background/worker app without RESTEasy Reactive or Vert.x HTTP; removing the quarkus-vertx-http dependency while keeping old management config; adding hibernate-search management config copied from a web application.

Related errors


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