hibernate/hibernate-orm · error · IntegrationException
Jakarta Validation provider was not available, but 'hibernat
Error message
Jakarta Validation provider was not available, but 'hibernate.tooling.schema.apply_validation_constraints' was resolved to 'REQUIRED'
What it means
Error "Jakarta Validation provider was not available, but 'hibernate.tooling.schema.apply_validation_constraints' was resolved to 'REQUIRED'" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java:104
public static void validateSuppliedFactory(Object object) {
if ( !(object instanceof ValidatorFactory) ) {
throw new IntegrationException( "Given object was not an instance of " + ValidatorFactory.class.getName()
+ " [" + object.getClass().getName() + "]" );
}
}
@SuppressWarnings("unused")
public static void activate(ActivationContext context) {
final ValidatorFactory factory;
try {
factory = getValidatorFactory( context );
}
catch (IntegrationException exception) {
if ( context.getValidationModes().contains( ValidationMode.CALLBACK ) ) {
throw new IntegrationException( "Jakarta Validation provider was not available, but 'callback' validation mode was requested", exception );
}
else if ( context.getValidationConstraintDdlInfluence() == ValidationConstraintDdlInfluence.REQUIRED ) {
throw new IntegrationException( "Jakarta Validation provider was not available, but '"
+ APPLY_VALIDATION_CONSTRAINTS + "' was resolved to 'REQUIRED'", exception );
}
else {
if ( exception.getCause() instanceof NoProviderFoundException ) {
// all good, we are looking at the ValidationMode.AUTO, and there are no providers available.
// Hence, we just don't enable the Jakarta Validation integration:
BEAN_VALIDATION_LOGGER.validationFactorySkipped();
return;
}
else {
// There is a Jakarta Validation provider, but it failed to bootstrap the factory for some reason,
// we should fail and let the user deal with it:
throw exception;
}
}
}
applyRelationalConstraints( factory, context );View on GitHub (pinned to fad1729dce)
Solutions
- Add a Jakarta Validation provider (e.g. Hibernate Validator plus jakarta.el) to the classpath.
- Alternatively relax hibernate.tooling.schema.apply_validation_constraints from REQUIRED to AUTO or SKIP.
- Verify no dependency exclusion removes jakarta.validation-api or the provider jar.
When it happens
Trigger: Bean Validation is requested but no Jakarta Validation provider/API is on the classpath.
Common situations: Setting jakarta.persistence.validation.mode=CALLBACK or AUTO, or hibernate.tooling.schema.apply_validation_constraints=REQUIRED, without adding Hibernate Validator (or another provider) as a dependency.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/8026bcd0ba893045.
Report an issue: GitHub.