I am trying to use Hibernate Validator. When attempting to start my JBoss I get the following:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
My environment is:
- JBoss 5.2
- Java 1.8
- Spring 3.2.11
These are what I have to work with.
I tried the following pom entries first.
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.3.1.Final</version>
</dependency>
That did not work, gave the above error. So I read that I could just go to the latest Hibernate Validator, 5.1.3 and would not need the separate javax dependency, so I removed the javax dependency and set the pom to version 5.1.3 of hibernate validator. Same issue.
What am I missing? Everything I read shows exactly what I have. Is there another dependency I am missing? I have seen some mention of slfj, do I need to have that dependency? If so, what version?
Anyone have an example of a pom for the 4.3.1 or 5.1.3 that works?
Frustrating, seems like this should be very simple, so probably something really obvious I am missing.