Saturday, April 26, 2014

Re: GWT and BV/javax.validation 1.1

On Saturday, April 26, 2014 12:00:33 PM UTC+2, wrote:
Thanks for your resonses.

Am Freitag, 25. April 2014 11:07:38 UTC+2 schrieb Thomas Broyer:

are there any plans to support more recent versions of BV in GWT?

I would not mind supporting and creating patches. My focus is on other OSS projects that fill my nights - so time and energy for GWT support would vary over time.
However, without modularization, I do not see a clean way to solve the problem.
GWT started with BV 1.0.0 and works with hibernate validator 4.1. Upgrading the code would cause incompatibilities with older versions and force people to upgrade with the GWT release.
This is one of the reasons why I heavily recommend the modularization of the GWT. Validation should be one of the modules.
Any workarounds for the moment (maybe I just have to override BV versions in client POMs)?

Yes, just use different versions on each side. Client-side validation only works with Hibernate Validator 4.1, but you're free to use whatever implementation and version you want on the server-side.
I tried but from a practical point of view with maven and eclipse this is inappropriate though technically possible.

As far as dependencies go, it should be a no-brainer in a well-architected Maven project (with separate modules for shared, client and server code; as in
Of course, that limits you to BV 1.0 in shared and client, so "practicality" greatly depends how (and where) you use bean validation in your project.
So far I created a temporary "solution" in my project that allows to compile and run with BV 1.1 and Hibernate Validator 5.x. However some new 1.1 features will currently only throw UnsupportedOperationException on the client. For those who are interested here is my current hack:
A question that arises is what new features will and should be supported in GWT clients? Method Validation? Should we raise our voice in BV community to ensure that method validation API will also get method variant for String + Class[] as alternative to java.lang.reflect.Method. However, I am not sure if method validation would cause too much overhead and should be supported at all. However, there are use-cases where it even makes sense on the client.
Is there a roadmap for a more modularized variant of GWT without gwt-dev and gwt-sevlet that contain arbitrary third-party code in fixed versions?

"ASAP", but it won't be before 3.0 (i.e. not in 2.7).
For 2.7, I might have managed to moved the build from Ant to Gradle, but that's all.
Google is currently working on disentangling module dependencies which will make it possible to modularize GWT (this work is necessary for incremental compilation anyway).
 I totally understand your roadmap. If a thread comes up with discussion about how to modularize GWT I would contribute my thoughts and suggestions...


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment