{"record":{"id":"9d7fb4bf7574af82","repo":"quarkusio/quarkus","slug":"the-fastboothibernateprovider-persistenceprovider-9d7fb4","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-reactive/runtime/src/main/java/io/quarkus/hibernate/reactive/runtime/FastBootHibernateReactivePersistenceProvider.java","lineNumber":351,"sourceCode":"\n        for (ProvidedService<?> providedService : recordedState.getProvidedServices()) {\n            if (!runtimeInitiatedServiceClasses.contains(providedService.serviceRole())) {\n                serviceRegistryBuilder.addService(providedService);\n            }\n        }\n\n        StandardServiceRegistryImpl standardServiceRegistry = serviceRegistryBuilder.buildNewServiceRegistry();\n\n        standardServiceRegistry.getService(SchemaManagementTool.class)\n                .setCustomDatabaseGenerationTarget(new ReactiveGenerationTarget(standardServiceRegistry));\n\n        return standardServiceRegistry;\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 boolean isProvider(PersistenceUnitDescriptor persistenceUnit) {\n        Map<Object, Object> props = Collections.emptyMap();\n        String requestedProviderName = FastBootHibernatePersistenceProvider.extractRequestedProviderName(persistenceUnit,\n                props);\n        if (requestedProviderName == null) {\n            // We'll always assume we are the best possible provider match unless the user\n            // explicitly asks for a different one.\n            return true;\n        }\n        return FastBootHibernateReactivePersistenceProvider.class.getName().equals(requestedProviderName)\n                || IMPLEMENTATION_NAME.equals(requestedProviderName)\n                || FastBootHibernatePersistenceProvider.class.getName().equals(requestedProviderName)\n                || \"org.hibernate.jpa.HibernatePersistenceProvider\".equals(requestedProviderName);","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-reactive/runtime/src/main/java/io/quarkus/hibernate/reactive/runtime/FastBootHibernateReactivePersistenceProvider.java#L333-L369","documentation":"Quarkus builds Hibernate configuration at build time; the FastBoot persistence provider resolves everything from the application's build-time configuration resources. If a caller passes a non-empty properties map to createEntityManagerFactory, Quarkus cannot honor those runtime-provided properties and throws PersistenceException.","triggerScenarios":"Calling Persistence.createEntityManagerFactory(name, properties) (or EntityManagerFactoryBuilder via PersistenceProvider with properties) with a non-null, non-empty Map; detected by FastBootHibernateReactivePersistenceProvider.verifyProperties during bootstrap.","commonSituations":"Porting standard Hibernate/JPA bootstrap code that passes JDBC url, credentials or hibernate.* settings as a Map; frameworks/libraries that programmatically pass properties; moving from vanilla Hibernate (properties accepted) to Quarkus reactive (not allowed).","solutions":["Move every property into application.properties under quarkus.hibernate-orm.* (and quarkus.datasource.*)","Call the no-properties overload: Persistence.createEntityManagerFactory(name)","Use Quarkus CDI injection of EntityManagerFactory instead of manual Persistence bootstrap","Use environment variables/config profiles (-Dquarkus.profile) for per-environment values instead of runtime maps"],"exampleFix":"// before\nMap<String, String> props = Map.of(\"hibernate.hbm2ddl.auto\", \"update\");\nEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"default\", props);\n\n// after\nEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"default\");\n// application.properties:\n// quarkus.hibernate-orm.schema-management.strategy=update","handlingStrategy":"validation","validationCode":"if (properties != null && !properties.isEmpty()) {\n    throw new IllegalArgumentException(\"Move Hibernate properties to application.properties\");\n}\nEntityManagerFactory emf = Persistence.createEntityManagerFactory(puName);","typeGuard":"boolean safeToBootstrap(Map<String,?> props) { return props == null || props.isEmpty(); }","tryCatchPattern":"try {\n    emf = Persistence.createEntityManagerFactory(puName, props);\n} catch (PersistenceException e) {\n    if (e.getMessage().contains(\"runtime provided properties\")) { migratePropsToConfig(props); }\n    throw e;\n}","preventionTips":["Never call createEntityManagerFactory(name, properties) in Quarkus; use config properties","Use env vars / config profiles for per-environment overrides","Prefer injecting EntityManagerFactory via CDI"],"tags":["hibernate-reactive","build-time-config","runtime-properties"],"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"}