I'm trying to get javax.validation working on Tomcat 7.
Ive got in my WEB_INF/lib: hibernate-validator-4.3.0 as well as slf4j-api-1.7.1 and slf4j-simple-1.7.1.
When I run my code, the validation is just ignored! Its all working fine on glassfish, has anyone else had this problem?
Cheers! NFV
You need the validation-api.jar
as well. It contains the Bean Validation API including the bootstrapping classes (javax.validation.Validation).
Perhaps you downloaded the loose JAR files instead of the distribution bundle. You can download the currently latest 4.3.0 release as zip here. It contains all the files you need to drop in /WEB-INF/lib
. After extracting the zip, you can find the validation-api.jar
in the /lib/required
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With