From b7f22d0f0f23a8a15e516bcda23d93d1659731c9 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 16 Jan 2025 17:36:09 +0200 Subject: [PATCH] Register `jakarta.validation.ConstraintViolation` unconditionally The class is accessed even when not using hibernate validator. Relates to https://github.com/quarkusio/quarkus/issues/41995 --- .../hibernate/orm/deployment/HibernateOrmProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java index 1ecb454e5f2cb..b9123066c200a 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java @@ -244,9 +244,10 @@ public void enrollBeanValidationTypeSafeActivatorForReflection(Capabilities capa if (capabilities.isPresent(Capability.HIBERNATE_VALIDATOR)) { reflectiveClasses.produce(ReflectiveClassBuildItem.builder("org.hibernate.boot.beanvalidation.TypeSafeActivator") .methods().fields().build()); - reflectiveClasses.produce(ReflectiveClassBuildItem.builder(BeanValidationIntegrator.JAKARTA_BV_CHECK_CLASS) - .constructors(false).build()); } + // Accessed in org.hibernate.boot.beanvalidation.BeanValidationIntegrator.isBeanValidationApiAvailable + reflectiveClasses.produce(ReflectiveClassBuildItem.builder(BeanValidationIntegrator.JAKARTA_BV_CHECK_CLASS) + .constructors(false).build()); } @BuildStep