Search code examples
tomcat7bean-validationhibernate-validatorjsf-2.2

Hibernate Validate ignore in Tomcat 7


My project can run on jboss7, it will be validate by hibernate validation but on tomcat7, it cannot be validate. I copied validation-api.jar, jboss-logging.jar in tomcat\lib path bur it still not work.


Solution

  • validation-api-X.Y.Z.jar is only the Bean Validation API, you also need to copy hibernate-validator-X.Y.Z.jar and all other JARs provided in the dist/lib/required folder of the distribution JAR. Alternatively you can use Maven as described in the reference guide to add all the required JARs to your WAR.