{"record":{"id":"5b0e948b19ad05a5","repo":"quarkusio/quarkus","slug":"hibernate-envers-activated-explicitly-for-persiste","errorCode":null,"errorMessage":"Hibernate Envers activated explicitly for persistence unit '${puName}', but the Hibernate Envers extension was disabled at build time. If you want Hibernate Envers to be active for this persistence unit, you must set '${enabledPropertyKey}' to 'true' at build time. If you don't want Hibernate Envers to be active for this persistence unit, you must leave '${activePropertyKey}' unset or set it to 'false'.","messagePattern":"Hibernate Envers activated explicitly for persistence unit '(.+?)', but the Hibernate Envers extension was disabled at build time\\. If you want Hibernate Envers to be active for this persistence unit, you must set '(.+?)' to 'true' at build time\\. If you don't want Hibernate Envers to be active for this persistence unit, you must leave '(.+?)' unset or set it to 'false'\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-envers/deployment/src/main/java/io/quarkus/hibernate/envers/deployment/HibernateEnversDisabledProcessor.java","lineNumber":46,"sourceCode":"            integrationProducer.produce(\n                    new HibernateOrmIntegrationStaticConfiguredBuildItem(HibernateEnversProcessor.HIBERNATE_ENVERS,\n                            puDescriptor.getPersistenceUnitName())\n                            .setInitListener(recorder.createStaticInitInactiveListener())\n                            // We don't need XML mapping if Envers is disabled\n                            .setXmlMappingRequired(false));\n        }\n    }\n\n    // TODO move this to runtime init once we implement in Hibernate ORM a way\n    //  to remove entity types from the metamodel on runtime init\n    public void checkNoExplicitActiveTrue(HibernateEnversBuildTimeConfig buildTimeConfig) {\n        for (var entry : buildTimeConfig.persistenceUnits().entrySet()) {\n            var config = entry.getValue();\n            if (config.active().isPresent() && config.active().get()) {\n                var puName = entry.getKey();\n                String enabledPropertyKey = HibernateEnversBuildTimeConfig.extensionPropertyKey(\"enabled\");\n                String activePropertyKey = HibernateEnversBuildTimeConfig.persistenceUnitPropertyKey(puName, \"active\");\n                throw new ConfigurationException(\n                        \"Hibernate Envers activated explicitly for persistence unit '\" + puName\n                                + \"', but the Hibernate Envers extension was disabled at build time.\"\n                                + \" If you want Hibernate Envers to be active for this persistence unit, you must set '\"\n                                + enabledPropertyKey\n                                + \"' to 'true' at build time.\"\n                                + \" If you don't want Hibernate Envers to be active for this persistence unit, you must leave '\"\n                                + activePropertyKey\n                                + \"' unset or set it to 'false'.\",\n                        Set.of(enabledPropertyKey, activePropertyKey));\n            }\n        }\n    }\n\n}\n","sourceCodeStart":28,"sourceCodeEnd":61,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-envers/deployment/src/main/java/io/quarkus/hibernate/envers/deployment/HibernateEnversDisabledProcessor.java#L28-L61","documentation":"At build time, if the Hibernate Envers extension was disabled (quarkus.hibernate-envers.enabled=false) but a persistence unit explicitly sets <pu>.active=true, Quarkus fails the build with a ConfigurationException explaining the conflict and pointing to the exact build-time property to change.","triggerScenarios":"Having quarkus.hibernate-envers.enabled=false (or omitting it while disabled) together with quarkus.hibernate-envers.<persistence-unit-name>.active=true in application.properties, during static init/disableHibernateEnversStaticInit.","commonSituations":"Explicitly activating Envers per PU while the extension is globally disabled; config left over after disabling the extension; misunderstanding that active=true can re-enable a build-time-disabled extension.","solutions":["Set quarkus.hibernate-envers.enabled=true at build time to use Envers for that persistence unit","Or remove the quarkus.hibernate-envers.<pu>.active=true entry (or set it to false/unset) to keep Envers disabled"],"exampleFix":"// before\nquarkus.hibernate-envers.enabled=false\nquarkus.hibernate-envers.\"<default>\".active=true\n// after\nquarkus.hibernate-envers.enabled=true\nquarkus.hibernate-envers.\"<default>\".active=true","handlingStrategy":"validation","validationCode":"if (!config.enabled() && config.persistenceUnits().values().stream()\n        .anyMatch(c -> c.active().orElse(false))) {\n    throw new IllegalArgumentException(\"Set quarkus.hibernate-envers.enabled=true or remove <pu>.active=true\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    build();\n} catch (ConfigurationException e) {\n    if (e.getMessage().contains(\"Hibernate Envers\")) {\n        LOG.error(\"Fix build-time Envers properties as described in the message\");\n    }\n    throw e;\n}","preventionTips":["When disabling an extension, also remove per-PU active=true overrides","Remember build-time properties cannot be changed at runtime","Verify config matrix (enabled vs per-PU active) in CI"],"tags":["hibernate-envers","configuration","build-time","quarkus"],"backgroundTag":"build-time-config-conflict","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"}