hibernate/hibernate-orm · error · IntegrationException
ValidatorFactory reference (provided via '%s' setting) was n
Error message
ValidatorFactory reference (provided via '%s' setting) was not an instance of '%s': %s
What it means
Error "ValidatorFactory reference (provided via '%s' setting) was not an instance of '%s': %s" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java:725
return jakartaValidationFactory;
}
final var jpaValidationFactory = cfgService.getSetting(
JPA_VALIDATION_FACTORY,
value -> validatorFactory( value, JPA_VALIDATION_FACTORY )
);
if ( jpaValidationFactory != null ) {
DEPRECATION_LOGGER.deprecatedSetting( JPA_VALIDATION_FACTORY, JAKARTA_VALIDATION_FACTORY );
return null;
}
return null;
}
private static ValidatorFactory validatorFactory(Object value, String setting) {
if ( value instanceof ValidatorFactory validatorFactory ) {
return validatorFactory;
}
else {
throw new IntegrationException(
String.format(
Locale.ENGLISH,
"ValidatorFactory reference (provided via '%s' setting) was not an instance of '%s': %s",
setting,
ValidatorFactory.class.getName(),
value.getClass().getName()
)
);
}
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Verify the object referenced by the given setting actually is a jakarta.validation.ValidatorFactory instance.
- Remove mismatched javax.validation vs jakarta.validation artifacts from the classpath so only one validation API is visible.
- If using JNDI lookup for the factory, confirm the JNDI binding holds a ValidatorFactory and not some other resource.
When it happens
Trigger: The ValidatorFactory supplied via configuration is of an incompatible type.
Common situations: Passing a non-jakarta ValidatorFactory (e.g. the old javax.validation one) through jakarta.persistence.validation.factory or a JNDI-bound factory after the javax-to-jakarta migration.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/a5cd06e231eb3aeb.
Report an issue: GitHub.