quarkusio/quarkus · error · IllegalArgumentException
The provided <settingName> setting value [<settingValue>] is
Error message
The provided <settingName> setting value [<settingValue>] is not supported!
What it means
loadSettingInstance expects the setting value to be either a Class object or a String containing a class name. If the configured value is neither (e.g. an instance of some other type, or a bare name that is not meant to be a class), the builder rejects it with this IllegalArgumentException naming the setting and the offending value.
Source
Thrown at extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java:697
if (clazz.isAssignableFrom(settingValue.getClass())) {
instance = (T) settingValue;
} else if (settingValue instanceof Class) {
instanceClass = (Class<? extends T>) settingValue;
} else if (settingValue instanceof String) {
String settingStringValue = (String) settingValue;
if (standardServiceRegistry != null) {
final ClassLoaderService classLoaderService = standardServiceRegistry.getService(ClassLoaderService.class);
instanceClass = classLoaderService.classForName(settingStringValue);
} else {
try {
instanceClass = (Class<? extends T>) Class.forName(settingStringValue);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Can't load class: " + settingStringValue, e);
}
}
} else {
throw new IllegalArgumentException(
"The provided " + settingName + " setting value [" + settingValue + "] is not supported!");
}
if (instanceClass != null) {
try {
instance = instanceClass.getConstructor().newInstance();
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
throw new IllegalArgumentException(
"The " + clazz.getSimpleName() + " class [" + instanceClass + "] could not be instantiated!",
e);
}
}
return instance;
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Supply the value as a String containing the fully-qualified class name (or the Class itself), not an instance.
- Inspect the message's settingName/value to find which property holds the wrong type.
- Remove the property if an equivalent Quarkus-first configuration option exists (e.g. quarkus.hibernate.orm.metadata-builder-contributor).
Example fix
// before properties.put(AvailableSettings.SESSION_FACTORY_NAME, myNamingStrategyInstance); // wrong slot/type // after properties.put(AvailableSettings.PHYSICAL_NAMING_STRATEGY, "com.example.MyPhysicalNamingStrategy");
Defensive patterns
Strategy: validation
Validate before calling
Object v = properties.get(settingName);
if (v != null && !(v instanceof String) && !(v instanceof Class)) {
throw new IllegalArgumentException(settingName + " must be a class name String or Class, got " + v.getClass());
} Try / catch
try {
bootPersistenceUnit();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("is not supported")) {
log.error("Setting value has wrong type; provide a class name string");
}
} Prevention
- Always configure class-valued settings as fully-qualified class name strings
- Do not put instances into Hibernate settings maps when booting via Quarkus
- Prefer Quarkus-native typed configuration properties over raw Hibernate settings
When it happens
Trigger: Passing a non-Class/non-String object into a setting like hibernate.metadata_builder_contributor (or its Quarkus equivalents) — e.g. programmatically setting an instance, a lambda, or a wrong type via a custom properties map fed to FastBootMetadataBuilder.
Common situations: Building the persistence unit properties programmatically and putting an instance object instead of the class; config binding mapping the property to a non-String type; copying plain-Hibernate settings that accept instances into the Quarkus static-init bootstrap which only accepts class names.
Related errors
- Top command must implement org.aesh.command.Command interfac
- The Hibernate ORM configuration in Quarkus does not support
- Datasource must be defined for persistence unit '%s'. Settin
- Unable to find file referenced in '<puPropertyKey(persistenc
- The FastbootHibernateProvider PersistenceProvider can not su
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/2e64e14824899f43.
Report an issue: GitHub.