-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Open
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on
Description
With Version 9 Hibernate Validator introduced a module-info file hiding the internal-packages (https://github.com/hibernate/hibernate-validator/blob/main/engine/pom.xml#L400-L402).
During application startup the class LocalValidatorFactoryBean calls the method externalClassLoader of the interface HibernateValidatorConfiguration via reflection. This is no longer possible on module-path aware applications since the implementation of the method is located in class org.hibernate.validator.internal.engine.AbstractConfigurationImpl.
Stacktrace:
java.lang.IllegalStateException: Could not access method or field: class org.springframework.util.ReflectionUtils cannot access class org.hibernate.validator.internal.engine.AbstractConfigurationImpl (in module org.hibernate.validator) because module org.hibernate.validator does not export org.hibernate.validator.internal.engine to unnamed module @7357a011
at org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:109)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:284)
at [email protected]/org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:267)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesJsr303Validator$Delegate.<init>(ConfigurationPropertiesJsr303Validator.java:72)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesJsr303Validator.<init>(ConfigurationPropertiesJsr303Validator.java:43)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getJsr303Validator(ConfigurationPropertiesBinder.java:182)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getValidators(ConfigurationPropertiesBinder.java:160)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getBindHandler(ConfigurationPropertiesBinder.java:114)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:95)
at [email protected]/org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:101)
... 47 more
A simple reproducer project is attached. The application starts successfully, if Hibernate Validator 8 is used instead of the new one.
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on