Results 1 to 2 of 2

Thread: Problems in validating with annotations

  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Default 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

  2. #2
    Join Date
    Oct 2009
    Posts
    18

    Default

    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
  •