开发者

Struts 2 Validation w/ annotations getting a null exception

We're trying to use Struts 2 Validation w/ Annotations and we've ran into a weird problem. We have a method that we have sp开发者_如何学Cecified a string validation for. When we run that method we get a NullException in the AnnotationValidationConfigurationBuilder on line 580. We took a look and it appears that the validationFactory is null. We traced that back and can't find a reason why it would be null though we did notice an @Inject annotation on the setValidatorFactory.

As a side note we're also using Spring 2 in the mix and calling it from the jQuery plugin.

Has anyone run into this before? We've looked at all the docs and none of them talk about needing to register a bean with Spring or anything like that.

Thanks,

Shane


We found the answer. Apparently if you have a validators.xml you need to specify everything in the base validators.xml. This has changed since we used this in the past without needing to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜