GWT Bean Validation + Hibernate Validator version?

337 views
Skip to first unread message

Chris Lercher

unread,
Sep 17, 2012, 8:45:52 AM9/17/12
to google-we...@googlegroups.com
What is the officially supported Hibernate Validator version that should be used in conjunction with GWT JSR 303 Bean Validation? (Note: I'm using the word "official", because the EXPERIMENTAL flag has now been removed in trunk.)

4.0.2 GA

4.0.2 GA is the version the "validation" sample uses in its pom.xml. But this doesn't really work: Compiling with "-strict" fails with

  Errors in 'jar:file:/path/to/gwt-2.5.0.rc1/gwt-user.jar!/org/hibernate/validator/super/org/hibernate/validator/constraints/impl/URLValidator.java'
         Line 20: The import org.hibernate.validator.constraints.URL cannot be resolved
         Line 26: URL cannot be resolved to a type

4.2.0 Final

I also tried 4.2.0 Final, but this fails twofold:

First problem:

  [ERROR] Errors in 'jar:file:/path/to/gwt-user.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
              [ERROR] Line 72: The constructor NodeImpl(String) is undefined

Second problem:

Version 4.2.0 requires Joda time, which cannot be used on the client side


4.1.0 Final

After some experimenting, I found that this is the only version that really works.

So I'd like to know, if this is the best version to use for now, and where we can find out when to upgrade to which newer version.

Thomas Broyer

unread,
Sep 17, 2012, 9:34:48 AM9/17/12
to google-we...@googlegroups.com, nch...@google.com
This has actually been reported a few days ago: http://code.google.com/p/google-web-toolkit/issues/detail?id=7661, and in the comments on the wiki page.
GWT is built against 4.1.0 Final and depends on Hibernate Validator internals (NodeImpl, PathImpl implementations, etc.), so I'd suggest you stick to that version, at least for compiling your client code (you could use 4.2.0 GA on the server-side for instance).

Chris Lercher

unread,
Sep 17, 2012, 9:54:20 AM9/17/12
to google-we...@googlegroups.com, nch...@google.com
Ok, thanks.

Jens

unread,
Sep 17, 2012, 10:00:14 AM9/17/12
to google-we...@googlegroups.com, nch...@google.com
Should GWT 2.5 SDK then bundle Hibernate Validator 4.1.0 if it depends on that specific (older) implementation? Or at least mention it somewhere in the docs that Hibernate 4.1.0 is the way to go?

-- J.
Reply all
Reply to author
Forward
0 new messages