quarkusio/quarkus · error · PersistenceException
The FastbootHibernateProvider PersistenceProvider can not su
Error message
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.
What it means
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.
Source
Thrown at extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java:454
@SuppressWarnings("rawtypes")
private static String extractProviderName(Map integration) {
if (integration == null) {
return null;
}
final String setting = (String) integration.get(AvailableSettings.JAKARTA_PERSISTENCE_PROVIDER);
return setting == null ? null : setting.trim();
}
private static String extractProviderName(PersistenceUnitDescriptor persistenceUnit) {
final String persistenceUnitRequestedProvider = persistenceUnit.getProviderClassName();
return persistenceUnitRequestedProvider == null ? null : persistenceUnitRequestedProvider.trim();
}
@SuppressWarnings("rawtypes")
private void verifyProperties(Map properties) {
if (properties != null && properties.size() != 0) {
throw new PersistenceException(
"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.");
}
}
private static void injectDataSource(String persistenceUnitName, String dataSourceName,
MultiTenancyStrategy multiTenancyStrategy,
RuntimeSettings.Builder runtimeSettingsBuilder) {
// Note: the counterpart of this code, but for multitenancy (injecting the connection provider),
// can be found in io.quarkus.hibernate.orm.runtime.boot.FastBootMetadataBuilder.mergeSettings
if (runtimeSettingsBuilder.isConfigured(AvailableSettings.URL) ||
runtimeSettingsBuilder.isConfigured(AvailableSettings.DATASOURCE) ||
runtimeSettingsBuilder.isConfigured(AvailableSettings.JPA_JTA_DATASOURCE) ||
runtimeSettingsBuilder.isConfigured(AvailableSettings.JPA_NON_JTA_DATASOURCE) ||
runtimeSettingsBuilder.isConfigured(AvailableSettings.JAKARTA_JTA_DATASOURCE) ||
runtimeSettingsBuilder.isConfigured(AvailableSettings.JAKARTA_NON_JTA_DATASOURCE)) {
// the datasource has been defined in the persistence unit, we can bail outView on GitHub (pinned to e1c734241f)
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.
Example fix
// before
Map<String,String> props = Map.of("hibernate.hbm2ddl.auto", "update");
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu", props);
// after: application.properties -> quarkus.hibernate-orm.schema-management.strategy=update
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu"); Defensive patterns
Strategy: validation
Validate before calling
if (properties != null && !properties.isEmpty()) {
throw new IllegalArgumentException(
"Quarkus does not accept runtime JPA properties; move to application.properties: " + properties.keySet());
} Try / catch
try {
Persistence.createEntityManagerFactory("pu", props);
} catch (PersistenceException e) {
if (e.getMessage().contains("can not support runtime provided properties")) {
throw new IllegalStateException("Move these keys to quarkus.hibernate-orm.*: " + props.keySet(), e);
} else throw e;
} Prevention
- 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.
When it happens
Trigger: verifyProperties, called from getEntityManagerFactoryBuilderOrNull, receives a non-null, non-empty Map (e.g. via createEntityManagerFactory(persistenceUnitInfo, properties)).
Common situations: 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.
Related errors
- Hibernate ORM activated explicitly for persistence unit '<pu
- The configuration ${clazz} is missing the @ConfigRoot annota
- Invalid configuration value set for 'quarkus.arc.remove-unus
- Hibernate Envers activated explicitly for persistence unit '
- Unable to find file referenced in '<puPropertyKey(persistenc
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/694339b6ff55d2dd.
Report an issue: GitHub.