Lokn
Lokn

Reputation: 431

Getting classcastexception for validation provider

I am getting class cast exception when running a jar from a web application in tomcat.

The exception is :

java.lang.ClassCastException: org.hibernate.validator.HibernateValidator cannot be cast to javax.validation.spi.ValidationProvider

I also tried to replace the hibernate validator jar to a different version , but it still gives the same error.

And when I remove the hibernate validator, I get no default provider error.

Upvotes: 1

Views: 1966

Answers (1)

noob
noob

Reputation: 95

I also faced this problem, the version of java and hibernate-validation I use are java11 and 7.0.1.Final. I use 6.2.0.Final version to avoid this problem.

Upvotes: 2

Related Questions