GWT 2.8.0 compile warnings

406 views
Skip to first unread message

Dave Kichler

unread,
Nov 23, 2016, 3:28:47 PM11/23/16
to GWT Users
I recently upgraded my GWT app to depend on 2.8.0 and had my compile phase immediately flooded with GWT compile warnings.  Under previous versions, there were no warnings at all.  I've done some Googling but haven't found a solution to this particular issue.  Some other similar issues surrounding other third party annotations have suggested solutions of ensuring the compile annotations are on the GWT compile classpath.  In this case, the compiled annotations are present in the gwt-user and gwt-servlet jars, both of which I have included on the compile classpath.  The warnings look like: 

Compiling module books.app.BooksApp
     [java]    Resolving books.app.common.BaseBooksApp
     [java]       Found type 'books.app.common.BaseBooksApp'
     [java]          Found type 'java.lang.Object'
     [java]             Resolving method getClass
     [java]                Found type 'java.lang.Class'
     [java]                   Resolving method createForClass
     [java]                      Found type 'java.lang.String'
     [java]                         Resolving method getFromCharCodeFunction
     [java]                            [WARN] Ignoring unresolvable annotation type jsinterop.annotations.JsProperty
     [java]                         Resolving method $isInstance
     [java]                            [WARN] Ignoring unresolvable annotation type jsinterop.annotations.JsMethod
     [java]          Resolving method isWelcomePageApplicable
     [java]             Found type 'java.lang.Long'
     [java]                Found type 'java.lang.Number'
     [java]                   Resolving method $isInstance
     [java]                      [WARN] Ignoring unresolvable annotation type jsinterop.annotations.JsMethod
     [java]             Found type 'java.lang.Boolean'
     [java]                Resolving method $isInstance
     [java]                   [WARN] Ignoring unresolvable annotation type jsinterop.annotations.JsMethod

Has anyone experienced similar warnings, and more importantly, is there any known solution to preventing them?

Any insight would be greatly appreciated.

Jens

unread,
Nov 23, 2016, 4:13:23 PM11/23/16
to GWT Users
Double check your classpath. Especially if you use gradle/maven make sure you really have only a single GWT version on classpath. Also try deleting your gwt-unitCache. 

-- J.

Kirill Prazdnikov

unread,
Nov 24, 2016, 9:03:20 AM11/24/16
to GWT Users

On Thursday, November 24, 2016 at 12:13:23 AM UTC+3, Jens wrote:
 Also try deleting your gwt-unitCache. 

This helps for our case many times per day. 
Even more we have a special single-button-task in IDEA that clears all gwt-unitCache(es) and this really helps in compilation and debugging.

Dave Kichler

unread,
Nov 25, 2016, 10:38:08 PM11/25/16
to GWT Users
Scoured my classpath for any conflicting dependencies and found none.  Also cleared out my gwt-unitCache but no to avail - the warnings still remain.  

Dave Kichler

unread,
Nov 27, 2016, 8:23:23 PM11/27/16
to GWT Users
Eventually figured out that the GWT jars downloaded from Google have the jsinterop annotations bundled within the gwt-user.jar, which are the ones referenced by Eclipse and the ones I checked for them.  The GWT jars provided by Maven central, and which my Ant/Ivy build were referencing, do not have the jsinterop package bundled in, and instead reference it as a transitive dependency that Ivy was failing to resolve properly (resolving only sources rather than compiled jar).  An explicit dependency giving Ivy the proper classifiers on jsinterop sorted things out.  Trying the same with Maven or Gradle resolves everything just fine without the explicit reference.

Stik

unread,
Dec 8, 2016, 12:18:44 PM12/8/16
to GWT Users
Hi Dave, how did you resolve this?  I'm not deeply familiar with Ivy, so feeling a bit out of my depth.  Adding an explicit dependency on jsinterop to my ivy.xml file seems to have no effect at my end, so long as gwt-user is in there too it overrides my classifier :\  If i take gwt-user out then it starts downloading the non-source jar too. 

Dave Kichler

unread,
Dec 8, 2016, 1:09:00 PM12/8/16
to GWT Users
The GWT 8 gwt-user jar (com.google.gwt:gwt-user:2.8.0) has a dependency on jsinterop 1.0.1.  The problem is Ivy fails to properly download that transitive dependency (grabs only the sources).  By adding an explicit dependency on jsinterop, and telling Ivy explicitly to download both binaries and sources and everything is good to go.  The explicit dependency looks like this:

<dependency org="com.google.jsinterop" name="jsinterop-annotations" rev="1.0.1" >
  <artifact name="jsinterop-annotations"/>
  <artifact name="jsinterop-annotations" m:classifier="sources"/>
</dependency>

Hope that helps sort you out.

Vassilis Virvilis

unread,
Dec 8, 2016, 2:01:06 PM12/8/16
to google-we...@googlegroups.com
+1 to Dave's answer

Here is the relevant bug https://issues.apache.org/jira/browse/IVY-1003


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Stik

unread,
Dec 9, 2016, 6:00:31 AM12/9/16
to GWT Users
Perfect, thankyou very much
Reply all
Reply to author
Forward
0 new messages