Announcement Announcement Module
No announcement yet.
<mvc:annotation-driven> ValidationException: Unable to find a default provider Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • <mvc:annotation-driven> ValidationException: Unable to find a default provider

    I am introducing <mvc:annotation-driven/> into an existing very large web application. I'm getting failures when <mvc:annotation-driven/> tries to instantiation JSR 303 validation:

    javax.validation.ValidationException: Unable to find a default provider

    We are not using JSR 303 validation at this point, but (probably because Websphere includes it with openjpa) Spring detects it on the classpath, attempts to configure it, fails, then renders the entire Spring applicationContext unusable. Is there some way to disable JSR validation creation even if it happens to be in the classpath?

  • #2
    You might want to check out his Stack Overflow question:

    How to force disable JSR-303 support in Spring 3?


    • #3
      Thanks, that's very helpful. The primary downside is the burden of keeping up with Spring's evolution. It would be preferable to have the option to directly specify this behavior. In general, the Spring framework makes lots of assumptions based on presence of libraries in the classpath; while this can be convenient, it can cause other problems when integrating with large applications especially with non-Spring libraries. As it turns out, in this case,JSR 303 validation api's were included by GWT 2.4, not websphere/openjpa as I originally thought.