{"record":{"id":"f64468e91a530d62","repo":"quarkusio/quarkus","slug":"hibernate-search-standalone-activated-explicitly","errorCode":null,"errorMessage":"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'.","messagePattern":"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 '(.+?)' to 'true' at build time\\. If you don't want Hibernate Search Standalone to be active, you must leave '(.+?)' unset or set it to 'false'\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-search-standalone-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/standalone/elasticsearch/runtime/HibernateSearchStandaloneRecorder.java","lineNumber":85,"sourceCode":"        Map<String, Object> bootProperties = new LinkedHashMap<>();\n        new StaticInitListener(mapperContext, buildTimeConfig, rootAnnotationMappedClasses)\n                .contributeBootProperties(bootProperties::put);\n        StandalonePojoIntegrationBooter booter = StandalonePojoIntegrationBooter.builder()\n                .properties(bootProperties)\n                // MethodHandles don't work at all in GraalVM 20 and below, and seem unreliable on GraalVM 21\n                .valueReadHandleFactory(ValueHandleFactory.usingJavaLangReflect())\n                // Integrate CDI\n                .property(StandalonePojoMapperSpiSettings.BEAN_PROVIDER, new ArcBeanProvider(Arc.container()))\n                .build();\n        booter.preBoot(bootProperties::put);\n        HibernateSearchStandalonePreBootState.set(bootProperties);\n    }\n\n    public void checkNoExplicitActiveTrue() {\n        if (runtimeConfig.getValue().active().orElse(false)) {\n            String enabledPropertyKey = HibernateSearchStandaloneRuntimeConfig.extensionPropertyKey(\"enabled\");\n            String activePropertyKey = mapperPropertyKey(\"active\");\n            throw new ConfigurationException(\n                    \"Hibernate Search Standalone activated explicitly,\"\n                            + \" but the Hibernate Search Standalone extension was disabled at build time.\"\n                            + \" If you want Hibernate Search Standalone to be active, you must set '\"\n                            + enabledPropertyKey\n                            + \"' to 'true' at build time.\"\n                            + \" If you don't want Hibernate Search Standalone to be active, you must leave '\"\n                            + activePropertyKey\n                            + \"' unset or set it to 'false'.\",\n                    Set.of(enabledPropertyKey, activePropertyKey));\n        }\n    }\n\n    public void clearPreBootState() {\n        HibernateSearchStandalonePreBootState.pop();\n    }\n\n    public Supplier<ActiveResult> checkActiveSupplier() {\n        return new Supplier<>() {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-search-standalone-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/standalone/elasticsearch/runtime/HibernateSearchStandaloneRecorder.java#L67-L103","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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."],"exampleFix":"// before: conflicting config\nquarkus.hibernate-search-standalone.enabled=false\nquarkus.hibernate-search-standalone.active=true\n\n// after: enable at build time, keep runtime flag unset\nquarkus.hibernate-search-standalone.enabled=true\n# quarkus.hibernate-search-standalone.active  (leave unset)","handlingStrategy":"validation","validationCode":"// Fail fast on the config contradiction before boot:\nboolean enabled = ConfigProvider.getConfig()\n    .getValue(\"quarkus.hibernate-search-standalone.enabled\", Boolean.class);\nboolean active = ConfigProvider.getConfig()\n    .getOptionalValue(\"quarkus.hibernate-search-standalone.active\", Boolean.class).orElse(false);\nif (!enabled && active) {\n    throw new IllegalArgumentException(\n        \"Set quarkus.hibernate-search-standalone.enabled=true at build time, or drop .active=true\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    quarkus.start();\n} catch (ConfigurationException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"was disabled at build time\")) {\n        LOGGER.error(\"Enable quarkus.hibernate-search-standalone.enabled=true at build time, or unset .active\");\n    }\n    throw e;\n}","preventionTips":["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."],"tags":["quarkus","hibernate-search","configuration","build-time-config"],"backgroundTag":"build-time-vs-runtime-config-conflict","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}