{"record":{"id":"d05d829a29c4dc05","repo":"hibernate/hibernate-orm","slug":"jakarta-validation-provider-was-not-available-but","errorCode":null,"errorMessage":"Jakarta Validation provider was not available, but 'callback' validation mode was requested","messagePattern":"Jakarta Validation provider was not available, but 'callback' validation mode was requested","errorType":"exception","errorClass":"IntegrationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java","lineNumber":101,"sourceCode":"\t * @param object The supplied ValidatorFactory instance.\n\t */\n\t@SuppressWarnings(\"unused\")\n\tpublic static void validateSuppliedFactory(Object object) {\n\t\tif ( !(object instanceof ValidatorFactory) ) {\n\t\t\tthrow new IntegrationException( \"Given object was not an instance of \" + ValidatorFactory.class.getName()\n\t\t\t\t\t\t\t+ \" [\" + object.getClass().getName() + \"]\" );\n\t\t}\n\t}\n\n\t@SuppressWarnings(\"unused\")\n\tpublic static void activate(ActivationContext context) {\n\t\tfinal ValidatorFactory factory;\n\t\ttry {\n\t\t\tfactory = getValidatorFactory( context );\n\t\t}\n\t\tcatch (IntegrationException exception) {\n\t\t\tif ( context.getValidationModes().contains( ValidationMode.CALLBACK ) ) {\n\t\t\t\tthrow new IntegrationException( \"Jakarta Validation provider was not available, but 'callback' validation mode was requested\", exception );\n\t\t\t}\n\t\t\telse if ( context.getValidationConstraintDdlInfluence() == ValidationConstraintDdlInfluence.REQUIRED ) {\n\t\t\t\tthrow new IntegrationException( \"Jakarta Validation provider was not available, but '\"\n\t\t\t\t\t\t+ APPLY_VALIDATION_CONSTRAINTS + \"' was resolved to 'REQUIRED'\", exception );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( exception.getCause() instanceof NoProviderFoundException ) {\n\t\t\t\t\t// all good, we are looking at the ValidationMode.AUTO, and there are no providers available.\n\t\t\t\t\t// Hence, we just don't enable the Jakarta Validation integration:\n\t\t\t\t\tBEAN_VALIDATION_LOGGER.validationFactorySkipped();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// There is a Jakarta Validation provider, but it failed to bootstrap the factory for some reason,\n\t\t\t\t\t// we should fail and let the user deal with it:\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java#L83-L119","documentation":"Error \"Jakarta Validation provider was not available, but 'callback' validation mode was requested\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Bean Validation is requested but no Jakarta Validation provider/API is on the classpath.","commonSituations":"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.","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)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}