-
Aug 22nd, 2008, 04:28 PM
#1
Problems in validating with annotations
Hello,
I am new to Spring Validation Module and I am having some problems to use
it.
I am have added the validation annotations into my pojos and configured it
(following wheelersoftware.com/articles/spring-bean-validation-framework-3.html
)
<bean id="configurationLoader"
class="org.springmodules.validation.bean.conf.load er.annotation.AnnotationBeanValidationConfiguratio nLoader"/>
<bean id="validator"
class="org.springmodules.validation.bean.BeanValid ator" >
<property name="configurationLoader" ref="configurationLoader" />
</bean>
But when validator.validate(pojo, result) is called, it seems it never
returns. Any ideas what is happening?
Also, I was looking for
org.springmodules.validation.bean.conf.loader.anno tation package and could
not find it, neither in the CVS or in the zip with dependencies source file.
Thanks,
Bruno
Responses
Date Author Subject
-
Oct 16th, 2009, 12:40 PM
#2
I had similar problem....
It was giving nullpointerException error at validator.validate().
I added
<context:annotation-config/> in the springmvc-training.xml file and it started working .
I guess, just giving <context:annotation-config/> in applicationContext.xml is not enuff.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules