gpt4 book ai didi

hibernate :java. lang.NoSuchMethodError :javax/validation/spi/ConfigurationState. getParameterNameProvider()Ljavax/validation/ParameterNameProvider

转载 作者:行者123 更新时间:2023-12-03 08:07:23 24 4
gpt4 key购买 nike

我们正在为基于 Spring-Hibernate 的应用程序执行 Junit 套件(使用 spring text conext 单元测试框架)。并使用 ANT 进行构建,并且在构建路径中低于 Hibernate Jars。

hibernate-validator-5.0.1.Final.jar
validation-api-1.1.0.Final.jar

hibernate-commons-annotations-4.0.2.Final.jar
hibernate-core-4.2.3.Final.jar
hibernate-ehcache-4.2.3.Final.jar
hibernate-entitymanager-4.2.3.Final.jar

我们得到以下错误似乎与 Hibernate 验证有关。
   java.lang.NoSuchMethodError:javax/validation/spi/ConfigurationState.getParameterNameProvider()Ljavax/validation/ParameterNameProvider at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.(ValidatorFactoryImpl.java:113) at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:45) at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:217) at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:50) at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:445) at org.hibernate.cfg.beanvalidation.TypeSafeActivator.activate(TypeSafeActivator.java:96) at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:150)

最佳答案

很可能您的类路径(在本例中为 1.0.0)上有旧版本的验证 API。非常类似于 this question .

关于 hibernate :java. lang.NoSuchMethodError :javax/validation/spi/ConfigurationState. getParameterNameProvider()Ljavax/validation/ParameterNameProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18901154/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com