-
Aug 10th, 2012, 12:04 PM
#1
<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?
-
Aug 11th, 2012, 03:34 AM
#2
You might want to check out his Stack Overflow question:
How to force disable JSR-303 support in Spring 3?
-
Aug 13th, 2012, 11:52 AM
#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.
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