{"record":{"id":"8026bcd0ba893045","repo":"hibernate/hibernate-orm","slug":"jakarta-validation-provider-was-not-available-but-8026bc","errorCode":null,"errorMessage":"Jakarta Validation provider was not available, but 'hibernate.tooling.schema.apply_validation_constraints' was resolved to 'REQUIRED'","messagePattern":"Jakarta Validation provider was not available, but 'hibernate\\.tooling\\.schema\\.apply_validation_constraints' was resolved to 'REQUIRED'","errorType":"exception","errorClass":"IntegrationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java","lineNumber":104,"sourceCode":"\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}\n\t\t}\n\n\t\tapplyRelationalConstraints( factory, context );","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/beanvalidation/TypeSafeActivator.java#L86-L122","documentation":"Error \"Jakarta Validation provider was not available, but 'hibernate.tooling.schema.apply_validation_constraints' was resolved to 'REQUIRED'\" 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 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."],"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"}