{"record":{"id":"694339b6ff55d2dd","repo":"quarkusio/quarkus","slug":"the-fastboothibernateprovider-persistenceprovider","errorCode":null,"errorMessage":"The FastbootHibernateProvider PersistenceProvider can not support runtime provided properties. Make sure you set all properties you need in the configuration resources before building the application.","messagePattern":"The FastbootHibernateProvider PersistenceProvider can not support runtime provided properties\\. Make sure you set all properties you need in the configuration resources before building the application\\.","errorType":"exception","errorClass":"PersistenceException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java","lineNumber":454,"sourceCode":"\n    @SuppressWarnings(\"rawtypes\")\n    private static String extractProviderName(Map integration) {\n        if (integration == null) {\n            return null;\n        }\n        final String setting = (String) integration.get(AvailableSettings.JAKARTA_PERSISTENCE_PROVIDER);\n        return setting == null ? null : setting.trim();\n    }\n\n    private static String extractProviderName(PersistenceUnitDescriptor persistenceUnit) {\n        final String persistenceUnitRequestedProvider = persistenceUnit.getProviderClassName();\n        return persistenceUnitRequestedProvider == null ? null : persistenceUnitRequestedProvider.trim();\n    }\n\n    @SuppressWarnings(\"rawtypes\")\n    private void verifyProperties(Map properties) {\n        if (properties != null && properties.size() != 0) {\n            throw new PersistenceException(\n                    \"The FastbootHibernateProvider PersistenceProvider can not support runtime provided properties. \"\n                            + \"Make sure you set all properties you need in the configuration resources before building the application.\");\n        }\n    }\n\n    private static void injectDataSource(String persistenceUnitName, String dataSourceName,\n            MultiTenancyStrategy multiTenancyStrategy,\n            RuntimeSettings.Builder runtimeSettingsBuilder) {\n        // Note: the counterpart of this code, but for multitenancy (injecting the connection provider),\n        // can be found in io.quarkus.hibernate.orm.runtime.boot.FastBootMetadataBuilder.mergeSettings\n\n        if (runtimeSettingsBuilder.isConfigured(AvailableSettings.URL) ||\n                runtimeSettingsBuilder.isConfigured(AvailableSettings.DATASOURCE) ||\n                runtimeSettingsBuilder.isConfigured(AvailableSettings.JPA_JTA_DATASOURCE) ||\n                runtimeSettingsBuilder.isConfigured(AvailableSettings.JPA_NON_JTA_DATASOURCE) ||\n                runtimeSettingsBuilder.isConfigured(AvailableSettings.JAKARTA_JTA_DATASOURCE) ||\n                runtimeSettingsBuilder.isConfigured(AvailableSettings.JAKARTA_NON_JTA_DATASOURCE)) {\n            // the datasource has been defined in the persistence unit, we can bail out","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java#L436-L472","documentation":"FastBootHibernatePersistenceProvider derives all settings from build-time configuration; the metadata and service registry are already wired, so runtime-supplied property maps cannot be honored. verifyProperties throws PersistenceException whenever a non-empty properties map is passed to factory creation.","triggerScenarios":"verifyProperties, called from getEntityManagerFactoryBuilderOrNull, receives a non-null, non-empty Map (e.g. via createEntityManagerFactory(persistenceUnitInfo, properties)).","commonSituations":"Plain Hibernate/JPA bootstrap code passing hibernate.hbm2ddl.auto or JDBC properties at runtime; libraries that programmatically configure JPA; test setup copied from non-Quarkus projects.","solutions":["Move all properties into application.properties under quarkus.hibernate-orm.* so no runtime map is needed.","Pass an empty/null properties map while configuring via application.properties or other Quarkus config sources.","Remove the code path injecting runtime properties and rely on env vars/system properties/profiles for overrides."],"exampleFix":"// before\nMap<String,String> props = Map.of(\"hibernate.hbm2ddl.auto\", \"update\");\nEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"pu\", props);\n// after: application.properties -> quarkus.hibernate-orm.schema-management.strategy=update\nEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"pu\");","handlingStrategy":"validation","validationCode":"if (properties != null && !properties.isEmpty()) {\n    throw new IllegalArgumentException(\n        \"Quarkus does not accept runtime JPA properties; move to application.properties: \" + properties.keySet());\n}","typeGuard":null,"tryCatchPattern":"try {\n    Persistence.createEntityManagerFactory(\"pu\", props);\n} catch (PersistenceException e) {\n    if (e.getMessage().contains(\"can not support runtime provided properties\")) {\n        throw new IllegalStateException(\"Move these keys to quarkus.hibernate-orm.*: \" + props.keySet(), e);\n    } else throw e;\n}","preventionTips":["Configure everything via quarkus.hibernate-orm.* build-time properties.","Use env vars/system properties/profiles for environment-specific overrides instead of runtime maps.","Pass an empty map when a third-party API requires one."],"tags":["quarkus","hibernate-orm","configuration","build-time"],"backgroundTag":"runtime-properties-unsupported","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"}