Help with building GWT from source - javax.validation.ConstraintValidation cannot be resolved

2,256 views
Skip to first unread message

Tom K.

unread,
Mar 25, 2011, 1:19:12 PM3/25/11
to Google Web Toolkit
I've downloaded both the main trunk version as well as the build under
releases/2.3, and both seem to have the same problem. I can get
everything built OK, and I'm not showing any errors in the output from
the build. When the build is complete, for some reason it labels the
final packaged build as gwt-0.0.0 (it does this using both the 2.3
release build as well as trunk). Everything seems to be fine and I
can deploy everything OK, up until I try and access my GWT app. When
I do, I get pages of errors because the import
javax.validation.ConstraintValidation cannot be resolved. I've tried
to figure out the numerous build scripts to figure out why this import
isn't included in my jar, but to no avail. Can anyone help me figure
out what I might be missing? This is my error log when I run my app:


[DEBUG] [scanlogistixclient] - Validating newly compiled units
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/EditorDriver.java'
[ERROR] [scanlogistixclient] - Line 20: The import
javax.validation.ConstraintViolation cannot be resolved
[ERROR] [scanlogistixclient] - Line 97: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/
AbstractSimpleBeanEditorDriver.java'
[ERROR] [scanlogistixclient] - Line 28: Name clash: The method
setConstraintViolations(Iterable<ConstraintViolation<?>>) of type
BaseEditorDriver<T,E> has the same erasure as
setConstraintViolations(Iterable<ConstraintViolation<?>>) of type
EditorDriver<T> but does not override it
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/BaseEditorDriver.java'
[ERROR] [scanlogistixclient] - Line 31: The import
javax.validation.ConstraintViolation cannot be resolved
[ERROR] [scanlogistixclient] - Line 67: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/SimpleViolation.java'
[ERROR] [scanlogistixclient] - Line 25: The import
javax.validation.ConstraintViolation cannot be resolved
[ERROR] [scanlogistixclient] - Line 40: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 43: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 44: Missing code implementation
in the compiler
[ERROR] [scanlogistixclient] - Line 49: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 49: Missing code implementation
in the compiler
[ERROR] [scanlogistixclient] - Line 70: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 72: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 73: ConstraintViolation<?>
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 77:
ConstraintViolation<capture#2-of ?> cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 81:
ConstraintViolation<capture#3-of ?> cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 89:
ConstraintViolation<capture#4-of ?> cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 93:
ConstraintViolation<capture#5-of ?> cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 98: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/testing/
MockSimpleBeanEditorDriver.java'
[ERROR] [scanlogistixclient] - Line 26: The import
javax.validation.ConstraintViolation cannot be resolved
[ERROR] [scanlogistixclient] - Line 35: The type
MockSimpleBeanEditorDriver<T,E> must implement the inherited abstract
method
EditorDriver<T>.setConstraintViolations(Iterable<ConstraintViolation<?
>>)
[ERROR] [scanlogistixclient] - Line 107: Name clash: The method
setConstraintViolations(Iterable<ConstraintViolation<?>>) of type
MockSimpleBeanEditorDriver<T,E> has the same erasure as
setConstraintViolations(Iterable<ConstraintViolation<?>>) of type
EditorDriver<T> but does not override it
[ERROR] [scanlogistixclient] - Line 108: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/Configuration.java'
[ERROR] [scanlogistixclient] - Line 93: TraversableResolver cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 105: ConstraintValidatorFactory
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 182: TraversableResolver cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 182: No source code is available
for type TraversableResolver; did you forget to inherit a required
module?
[ERROR] [scanlogistixclient] - Line 194: ConstraintValidatorFactory
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 194: No source code is available
for type ConstraintValidatorFactory; did you forget to inherit a
required module?
[ERROR] [scanlogistixclient] - Line 202: ValidatorFactory cannot be
resolved to a type
[ERROR] [scanlogistixclient] - Line 202: No source code is available
for type ValidatorFactory; did you forget to inherit a required
module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/
ConstraintViolationException_CustomFieldSerializer.java'
[ERROR] [scanlogistixclient] - Line 30: ConstraintViolationException
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 34: ConstraintViolationException
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 34: No source code is available
for type ConstraintViolationException; did you forget to inherit a
required module?
[ERROR] [scanlogistixclient] - Line 39: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 39: ConstraintViolation cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Line 40: ConstraintViolationException
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 44: ConstraintViolationException
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/
MessageInterpolator.java'
[ERROR] [scanlogistixclient] - Line 21: The import
javax.validation.metadata cannot be resolved
[ERROR] [scanlogistixclient] - Line 66: ConstraintDescriptor cannot
be resolved to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/constraints/
Pattern.java'
[ERROR] [scanlogistixclient] - Line 30: The import
javax.validation.Constraint cannot be resolved
[ERROR] [scanlogistixclient] - Line 31: The import
javax.validation.Payload cannot be resolved
[ERROR] [scanlogistixclient] - Line 49: Constraint cannot be
resolved to a type
[ERROR] [scanlogistixclient] - Line 49: The attribute validatedBy is
undefined for the annotation type Constraint
[ERROR] [scanlogistixclient] - Line 75: Payload cannot be resolved
to a type
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/spi/
ConfigurationState.java'
[ERROR] [scanlogistixclient] - Line 22: The import
javax.validation.ConstraintValidatorFactory cannot be resolved
[ERROR] [scanlogistixclient] - Line 24: The import
javax.validation.TraversableResolver cannot be resolved
[ERROR] [scanlogistixclient] - Line 93: ConstraintValidatorFactory
cannot be resolved to a type
[ERROR] [scanlogistixclient] - Line 107: TraversableResolver cannot
be resolved to a type
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.core.client.impl.SchedulerImpl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.user.client.UserAgentAsserter
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.allen_sauer.gwt.dnd.client.util.DragEntryPoint
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.scanlogistix.webapp.client.ScanLogistixClient
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.user.client.ui.UIObject.DebugIdImpl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.dom.client.DOMImpl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.i18n.client.BidiPolicy.BidiPolicyImpl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.user.client.ui.ScrollPanel.Impl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.event.dom.client.TouchEvent.TouchSupportDetector
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule
[DEBUG] [scanlogistixclient] - Rebinding
com.google.gwt.dom.client.StyleInjector.StyleInjectorImpl
[DEBUG] [scanlogistixclient] - Checking rule <generate-with
class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] [scanlogistixclient] - Unknown type
'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in
deferred binding rule

David Chandler

unread,
Mar 25, 2011, 4:33:36 PM3/25/11
to google-we...@googlegroups.com, Tom K.
Hi Tom,

Sounds like you're running an app that uses RequestFactory, which requires additional 3rd party dependencies on the server. These are available in gwt-servlet-deps.jar which you'll find in the gwt-0.0.0 dir. You just need to add it to your classpath.

If you're using Maven, the Expenses sample POM includes these for you.

By the way, the gwt-0.0.0 numbering is correct if you're building from trunk or the release branch, which hasn't been released yet.

/dmc


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




--
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

Tom K.

unread,
Mar 25, 2011, 6:50:19 PM3/25/11
to Google Web Toolkit
Thanks for the quick reply.

That seemed to remove a bunch of my errors, but now I'm still left
with errors. Forgive my ignorance on how Java dependencies work, I
work primarily in C/C++, so I don't work in Eclipse as much as I
should.

I looked at Maven earlier today for the first time, but I seem so
close to getting it to run now, that I wanted to get it working first
before I attempted to get Maven working.

What I did was copy gwt-servlet-deps.jar into my project's
directory, and in Eclipse, I added it into the build path for my
project. It seems that gwt is still using it though, and isn't
finding the reference to it. Is there an ant setting I need to update
to include it in the gwt package, or did I just not add the dependency
correctly?

Here's my error output when I run:
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/EditorDriver.java'
[ERROR] [scanlogistixclient] - Line 97: No source code is available
for type javax.validation.ConstraintViolation<T>; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/BaseEditorDriver.java'
[ERROR] [scanlogistixclient] - Line 67: No source code is available
for type javax.validation.ConstraintViolation<T>; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/SimpleViolation.java'
[ERROR] [scanlogistixclient] - Line 40: No source code is available
for type javax.validation.ConstraintViolation<T>; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/com/google/gwt/editor/client/testing/
MockSimpleBeanEditorDriver.java'
[ERROR] [scanlogistixclient] - Line 108: No source code is available
for type javax.validation.ConstraintViolation<T>; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/Configuration.java'
[ERROR] [scanlogistixclient] - Line 93: No source code is available
for type javax.validation.TraversableResolver; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Line 105: No source code is available
for type javax.validation.ConstraintValidatorFactory; did you forget
to inherit a required module?
[ERROR] [scanlogistixclient] - Line 202: No source code is available
for type javax.validation.ValidatorFactory; did you forget to inherit
a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/
ConstraintViolationException_CustomFieldSerializer.java'
[ERROR] [scanlogistixclient] - Line 30: No source code is available
for type javax.validation.ConstraintViolationException; did you forget
to inherit a required module?
[ERROR] [scanlogistixclient] - Line 39: No source code is available
for type javax.validation.ConstraintViolation<T>; did you forget to
inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/
MessageInterpolator.java'
[ERROR] [scanlogistixclient] - Line 66: No source code is available
for type javax.validation.metadata.ConstraintDescriptor<T>; did you
forget to inherit a required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/constraints/
Pattern.java'
[ERROR] [scanlogistixclient] - Line 75: No source code is available
for type javax.validation.Payload; did you forget to inherit a
required module?
[ERROR] [scanlogistixclient] - Errors in 'jar:file:/D:/Program
%20Files/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.trunk.v20110304/gwt-0.0.0/gwt-
user.jar!/javax/validation/super/javax/validation/spi/
ConfigurationState.java'
[ERROR] [scanlogistixclient] - Line 93: No source code is available
for type javax.validation.ConstraintValidatorFactory; did you forget
to inherit a required module?
[ERROR] [scanlogistixclient] - Line 107: No source code is available
for type javax.validation.TraversableResolver; did you forget to
inherit a required module?

RS

unread,
May 4, 2011, 1:14:23 PM5/4/11
to Google Web Toolkit

.. need to add gwt-servlet-jar, validation-api-1.0.0.GA.jar and
validation-api-1.0.0.GA-sources.jar to solve this.

<target name="libs" description="Copy libs to WEB-INF/lib">
<mkdir dir="war/WEB-INF/lib" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-
deps.jar"/>
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/validation-
api-1.0.0.GA.jar"/>
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/validation-
api-1.0.0.GA-sources.jar"/>
<!-- Add any additional server libs that need to be copied -->
</target>

Juan Pablo Gardella

unread,
May 5, 2011, 12:04:34 AM5/5/11
to google-we...@googlegroups.com

Eugen Paraschiv

unread,
Jun 30, 2011, 10:09:32 AM6/30/11
to google-we...@googlegroups.com
Adding the validation-api to the classpath now results in
javax.validation.ValidationException: Unable to find a default provider
I do have gwt-servlet on the classpath as well, but it seems that without something like hibernate-validator (which is a provider), it doesn't find one.
Any thoughts on this?
Thanks.
Eugen.

Nick Chalko

unread,
Jun 30, 2011, 11:47:41 AM6/30/11
to google-we...@googlegroups.com
Correct you need hibernate-validator in your class path to generate Client Side validators. 

Eugen Paraschiv

unread,
Jun 30, 2011, 11:50:07 AM6/30/11
to google-we...@googlegroups.com
I have indeed added it to the classpath, but the HibernateValidator.gwt.xml module is nowhere to be found.
Thanks for the feedback.
Eugen.

--

Nick Chalko

unread,
Jun 30, 2011, 11:53:56 AM6/30/11
to google-we...@googlegroups.com
On Thu, Jun 30, 2011 at 8:50 AM, Eugen Paraschiv <hanri...@gmail.com> wrote:
I have indeed added it to the classpath, but the HibernateValidator.gwt.xml module is nowhere to be found.
Thanks for the feedback.


svn/trunk/user/src/org/hibernate/validator/HibernateValidator.gwt.xml  ?



Nick Chalko

unread,
Jun 30, 2011, 11:54:34 AM6/30/11
to google-we...@googlegroups.com
Which is probably not included until gwt 2.4
 


 

Eugen Paraschiv

unread,
Jun 30, 2011, 11:58:33 AM6/30/11
to google-we...@googlegroups.com

Saw it there. Ok so until 2.4 what is the recommended way of doing validation?

Nick Chalko

unread,
Jun 30, 2011, 12:01:26 PM6/30/11
to google-we...@googlegroups.com
On Thu, Jun 30, 2011 at 8:58 AM, Eugen Paraschiv <hanri...@gmail.com> wrote:

Saw it there. Ok so until 2.4 what is the recommended way of doing validation?


Not supported on the client.  And in 2.4 is still "experimental", it is my 20% project,  I hope to finish it this summer.   

Eugen Paraschiv

unread,
Jun 30, 2011, 12:09:54 PM6/30/11
to google-we...@googlegroups.com

I understand. Validation is essential for something like GWT. Waiting for 2.4 then.
Thanks for the quick replies.
Eugen.

Reply all
Reply to author
Forward
0 new messages