| With Hibernate 5.2.4.Final the following code successfully creates a Validator, even if no EL implementation is available on the classpath:
private Validator getSimpleValidator() {
final Configuration<?> cfg = Validation.byDefaultProvider().configure();
cfg.messageInterpolator(new ParameterMessageInterpolator());
return cfg.buildValidatorFactory().getValidator();
}
This is because the eager EL check introduced in
HV-793 Closed is avoided by using ParameterMessageInterpolator, introduced in
HV-853 Closed . But it seems to me
HV-1039 Closed broke this feature in commit 6bfde6e, because the EL presence check is now part of the classloading of ResourceBundleMessageInterpolator, which is an unconditional side-effect of instantiating ConfigurationImpl, which is what HibernateValidator#createGenericConfiguration does. So with Hibernate 5.3.0.Final the code above throws this exception:
|