Hibernate Validator java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl

前端 未结 7 537
南方客
南方客 2021-01-19 02:15

I have read this and this, but that didn\'t help...

I am using hibernate validator with the following versions/dependencies:


             


        
7条回答
  •  不要未来只要你来
    2021-01-19 02:39

    I had this issue when working on a spring-boot application. The problem was caused by hibernate-validator 6.0.11 which seems to have an erroneous dependency on javax validation-api 2.0.1.Final. For me the solution was to upgrade to a higher version of hibernate-validator.

    In more detail:
    My application was depending on spring-boot-starter-parent 2.1.18.RELEASE. The spring-boot-starter-web package depends on hibernate-validator 6.0.11, which itself depends on validation-api-2.0.1.Final. validation-api-2.0.1.Final however requires a higher version of the hibernate validator causing the ValueExtractorManager NoClassDefFoundError. The problem was fixed after upgrading the application to spring-boot-starter-parent 2.1.18.RELEASE which utilizes hibernate-validator 6.0.21.Final.

提交回复
热议问题