ClassNotFoundException: javax.validation.ValidatorFactory

后端 未结 2 1353
北海茫月
北海茫月 2020-12-12 05:00

I am trying to run a Spring MVC application in my local machine through Tomcat, but I am seeing:

NoClassDefFoundError: javax/validation/ValidatorFactory
         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 05:23

    You have the necessary jar file you need in hibernate-validator. This jar includes the javax.validation.ValidatorFactoryvalidation-api. So if you are including validation-api explicitly, you might have dependency conflicts. If not, you might just be having class reloading issues. Try cleaning your tomcat and restarting your IDE.

提交回复
热议问题