I have read this and this, but that didn't help...
I am using hibernate validator with the following versions/dependencies:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.FINAL</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b08</version>
</dependency>
I thought I'm doing everything correctly, and my logs (with verbose:class as a flag) tell me that:
[Loaded org.hibernate.validator.internal.engine.ConfigurationImpl from file:.../hibernate-validator-5.4.1.Final.jar]
[Loaded javax.validation.Validation from file:.../validation-api-1.1.0.Final.jar]
But later at runtime, when I use
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
I get the classic error:
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
I also tried downgrading to hibernate-validator 4.3.1 and javax.validation-api 1.0.0, but the error weirdly enough remained the same.
I have loads of other dependencies in this project(e.g. Spring etc.) , but as far as I can see, none that use hibernate-validator or the javax validation api. (If that were the case, I'd also see them loaded in the logs, wouldn't I?)
Is there any help?