quarkusio/quarkus · error · ConfigurationException
Hibernate Search Standalone activated explicitly, but the Hi
Error message
Hibernate Search Standalone activated explicitly, but the Hibernate Search Standalone extension was disabled at build time. If you want Hibernate Search Standalone to be active, you must set '${enabledPropertyKey}' to 'true' at build time. If you don't want Hibernate Search Standalone to be active, you must leave '${activePropertyKey}' unset or set it to 'false'. What it means
The Hibernate Search Standalone extension was disabled at BUILD time (quarkus.hibernate-search-standalone.enabled=false, so nothing was wired), but at RUNTIME the configuration explicitly activates it (quarkus.hibernate-search-standalone.active=true). checkNoExplicitActiveTrue detects this contradiction and throws a Quarkus ConfigurationException explaining which build-time property to enable or that the runtime 'active' flag should be left unset/false.
Source
Thrown at extensions/hibernate-search-standalone-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/standalone/elasticsearch/runtime/HibernateSearchStandaloneRecorder.java:85
Map<String, Object> bootProperties = new LinkedHashMap<>();
new StaticInitListener(mapperContext, buildTimeConfig, rootAnnotationMappedClasses)
.contributeBootProperties(bootProperties::put);
StandalonePojoIntegrationBooter booter = StandalonePojoIntegrationBooter.builder()
.properties(bootProperties)
// MethodHandles don't work at all in GraalVM 20 and below, and seem unreliable on GraalVM 21
.valueReadHandleFactory(ValueHandleFactory.usingJavaLangReflect())
// Integrate CDI
.property(StandalonePojoMapperSpiSettings.BEAN_PROVIDER, new ArcBeanProvider(Arc.container()))
.build();
booter.preBoot(bootProperties::put);
HibernateSearchStandalonePreBootState.set(bootProperties);
}
public void checkNoExplicitActiveTrue() {
if (runtimeConfig.getValue().active().orElse(false)) {
String enabledPropertyKey = HibernateSearchStandaloneRuntimeConfig.extensionPropertyKey("enabled");
String activePropertyKey = mapperPropertyKey("active");
throw new ConfigurationException(
"Hibernate Search Standalone activated explicitly,"
+ " but the Hibernate Search Standalone extension was disabled at build time."
+ " If you want Hibernate Search Standalone to be active, you must set '"
+ enabledPropertyKey
+ "' to 'true' at build time."
+ " If you don't want Hibernate Search Standalone to be active, you must leave '"
+ activePropertyKey
+ "' unset or set it to 'false'.",
Set.of(enabledPropertyKey, activePropertyKey));
}
}
public void clearPreBootState() {
HibernateSearchStandalonePreBootState.pop();
}
public Supplier<ActiveResult> checkActiveSupplier() {
return new Supplier<>() {View on GitHub (pinned to e1c734241f)
Solutions
- Set quarkus.hibernate-search-standalone.enabled=true in application.properties (build-time) and rebuild/restart so the extension actually boots.
- If you do not want Hibernate Search Standalone, remove the quarkus.hibernate-search-standalone.active=true line (or set it to false) in the offending profile/source.
- Check for environment variables overriding it: unset QUARKUS_HIBERNATE_SEARCH_STANDALONE_ACTIVE (and per-profile variants) in your deployment.
- If you meant the ORM flavor, configure quarkus.hibernate-search-orm.* properties instead of the standalone ones.
Example fix
// before: conflicting config quarkus.hibernate-search-standalone.enabled=false quarkus.hibernate-search-standalone.active=true // after: enable at build time, keep runtime flag unset quarkus.hibernate-search-standalone.enabled=true # quarkus.hibernate-search-standalone.active (leave unset)
Defensive patterns
Strategy: validation
Validate before calling
// Fail fast on the config contradiction before boot:
boolean enabled = ConfigProvider.getConfig()
.getValue("quarkus.hibernate-search-standalone.enabled", Boolean.class);
boolean active = ConfigProvider.getConfig()
.getOptionalValue("quarkus.hibernate-search-standalone.active", Boolean.class).orElse(false);
if (!enabled && active) {
throw new IllegalArgumentException(
"Set quarkus.hibernate-search-standalone.enabled=true at build time, or drop .active=true");
} Try / catch
try {
quarkus.start();
} catch (ConfigurationException e) {
if (e.getMessage() != null && e.getMessage().contains("was disabled at build time")) {
LOGGER.error("Enable quarkus.hibernate-search-standalone.enabled=true at build time, or unset .active");
}
throw e;
} Prevention
- Remember 'enabled' is build-time-only; never expect 'active=true' alone to enable the extension.
- Audit profiles and env vars (QUARKUS_HIBERNATE_SEARCH_STANDALONE_ACTIVE) that can inject active=true.
- Keep ORM and standalone property prefixes separate; don't copy keys between them.
When it happens
Trigger: checkNoExplicitActiveTrue runs (via disableHibernateSearch when the extension was build-time disabled) and runtimeConfig.getValue().active().orElse(false) is true — i.e. the runtime property quarkus.hibernate-search-standalone.active is set to true (in application.properties, an env var QUARKUS_HIBERNATE_SEARCH_STANDALONE_ACTIVE=true, or a system property) while the extension was disabled at build time.
Common situations: Setting active=true in application.properties for a profile (e.g. %prod or %test) while enabled=false or the build excluded the search mapping; inheriting active=true from an environment variable in Kubernetes/CI; copy-pasting ORM Hibernate Search config keys into the standalone extension; expecting 'active' alone to turn the extension on (it cannot — 'enabled' is build-time only).
Related errors
- Failed to load application configuration
- Failed to initialize application configuration
- The Elasticsearch version needs to be defined via properties
- Unrecognized option for quarkus.bootstrap.misaligned-platfor
- The configuration ${clazz} is missing the @ConfigRoot annota
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f64468e91a530d62.
Report an issue: GitHub.