@autowired-DAO时的ValidationException

时间:2012-06-11 18:55:41

标签: java spring google-app-engine

我正在尝试为我的应用添加JPA支持,但是我收到了这个错误:

Caused by: javax.validation.ValidationException: Unable to find a default provider
    at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264)
    at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:183)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    ... 37 more

虽然我在WEB-INF / lib文件夹中有这些jar:

validation-api-1.0.0.GA.jar
validation-api-1.0.0.GA-sources.jar

1 个答案:

答案 0 :(得分:3)

我不确定,但我最好的猜测validation-api实际上并不是验证的实现,因此您仍然需要包含Hibernate Validator之类的内容。