Eclipse setup, javax.validation missing and jsp syntax highlighting

478 views
Skip to first unread message

sixcorners

unread,
Nov 13, 2010, 7:55:39 AM11/13/10
to Google Web Toolkit
I see in the RequestFactory example (http://code.google.com/p/google-
web-toolkit/source/browse/trunk/samples/expenses/src/main/java/com/
google/gwt/#gwt/sample/expenses/shared), the Entity has properties
that have constraint annotations like
javax.validation.constraints.Size. Unfortunately when I try to use
them Eclipse just gives me red lines.. I think the package is missing.
How can I fix this? I'm on Ubuntu Linux with as little changed as is
required to get the Google Web Toolkit Plugin working.

Also .jsp files in my war directory are not getting highlighted and
can only be opened with a Text Editor. Is there a thing from one of
the eclipse software repositories that I need to download? I tried
installing a bunch of Java related stuff but it hasn't helped.

-sowdri-

unread,
Nov 19, 2010, 7:54:49 AM11/19/10
to Google Web Toolkit
Even I'm facing the same problem.

FILE: /Expenses/src/com/google/gwt/sample/expenses/server/domain/
Employee.java

/* these imports fails */
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

...

I've been trying to make things work for a long time. Any help is
appreciated.

Steve Moyer

unread,
Nov 30, 2010, 1:18:31 PM11/30/10
to Google Web Toolkit
I'm assuming that neither of you are using Maven as this library is
included at http://repo1.maven.org/maven2/javax/validation/validation-api/1.0.0.GA/,
so you'll need to download it and manually add it to your classpath.

Hope this helps!

smoyer

-sowdri-

unread,
Dec 20, 2010, 5:00:51 AM12/20/10
to google-we...@googlegroups.com
Thanks Steve! 

Indeed that solution works. As you rightly said, I did not use Maven for building the project :)

sam jones

unread,
Feb 25, 2016, 3:24:38 PM2/25/16
to GWT Users
I just created a new workspace in Spring STS AFTER importing all my jars with a gradle build and it worked. Without the new workspace created, it did not work.
Reply all
Reply to author
Forward
0 new messages