On Tue, Dec 6, 2011 at 7:46 AM, Nicolas.Rocca <[email protected]>wrote:

> We use gwt-validation-2.0-BETA-SNAPSHOT-r269.jar and GWT 2.4.
> 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).
>
>
Partially Correct,  Try just adding the hibernate-validator jar. and leave
the GWT one in place.

To have server side validation you need hibernate or some other vilidation
provider like apache-bval.

GWT validation only handles the client side part

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to