hibernate/hibernate-orm · error · IntegrationException
Jakarta Validation provider was not available, but 'callback
Error message
Jakarta Validation provider was not available, but 'callback' validation mode was requested
What it means
Error "Jakarta Validation provider was not available, but 'callback' validation mode was requested" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java:101
* @param object The supplied ValidatorFactory instance.
*/
@SuppressWarnings("unused")
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;
}
}View on GitHub (pinned to fad1729dce)
Solutions
- Add a Jakarta Validation (Bean Validation) provider such as Hibernate Validator to the classpath, e.g. org.hibernate.validator:hibernate-validator.
- If validation is not wanted, set jakarta.persistence.validation.mode to NONE instead of CALLBACK.
- Check that the validation provider jar is not excluded by dependency scopes (e.g. marked test or provided but missing at runtime).
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/d05d829a29c4dc05.
Report an issue: GitHub.