The field of the entity is annotated with
javax.validation.constraints.NotNull
Client side validation works and also server side validation in hosted
mode (jetty).
But when deployed in tomcat (6.0.20), we get the following exception
when server side validation is invoked:
Caused by: javax.validation.UnexpectedTypeException: No validator was
found for javax.validation.constraints.NotNull with type
[...deleted...]
at
com.em.validation.client.CoreValidatorImpl.validateConstraint(CoreValidatorImpl.java:
372)
at
com.em.validation.client.CoreValidatorImpl.validateValue(CoreValidatorImpl.java:
202)
at
com.em.validation.client.CoreValidatorImpl.validateProperty(CoreValidatorImpl.java:
119)
at
com.em.validation.client.CoreValidatorImpl.validate(CoreValidatorImpl.java:
76)
at
com.em.validation.client.CoreValidatorImpl.validate(CoreValidatorImpl.java:
96)
at com.em.validation.client.ValidatorImpl.validate(ValidatorImpl.java:
48)
at ...
Our war-file contains the gwt-validation-2.0-BETA-SNAPSHOT-r269.jar
and also the validation-api-1.0.0.GA.jar.
Replacing the gwt-validation-2.0-BETA-SNAPSHOT-r269.jar in the war
file with hibernate-validator-4.2.0.Final.jar seems to fix the problem
(as a workaround).
Thanks for help in advance!
But this project is supposed to provide both services. I also find it
interesting to work on a JSR standard. If others don't want to use it
for that purpose then that's fine.
That *would* help in this case I think. I you should just be able to
drop in the Hibernate Validator jar.
Chris