Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Problems in validating with annotations Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X