Guava version which is compatible with GWT 2.9.0

266 views
Skip to first unread message

pratik thaker

unread,
Feb 26, 2021, 6:14:31 AM2/26/21
to GWT Users
Hi Team,

We were using GWT 2.7.0 and guava-18 earlier.

Recently we have upgraded to GWT 2.9.0 and we are facing issue in using below classes from guava,

com.google.common.collect.ComparisonChain
com.google.common.collect.Ordering

I tried upgrading to guava-gwt-29.0-jre.jar but for that we are getting below error,

                            [ERROR] Line 373: ComparisonChain cannot be resolved
     [java]             [ERROR] Line 8: The import com.google.common cannot be resolved
     [java]             [ERROR] Line 374: Ordering cannot be resolved
     [java]             [ERROR] Line 7: The import com.google.common cannot be resolved

Can you please help me compile ?

pratik thaker

unread,
Feb 26, 2021, 6:22:12 AM2/26/21
to GWT Users
I just realized that this might be because I had remove below line from my gwt.xml file,

<inherits name="com.google.common.collect.Collect"/>

I am checking now.

pratik thaker

unread,
Feb 26, 2021, 6:29:45 AM2/26/21
to GWT Users
I am facing below errors now,

Tracing compile failure path for type 'com.google.common.collect.ComparisonChain'
     [java]       [ERROR] Errors in 'jar:file:/C:/Pratik/ETD/Import/Google/guava/21.0/guava-gwt-29.0-jre.jar!/com/google/common/collect/ComparisonChain.java'
     [java]          [ERROR] Line 191: Nullable cannot be resolved to a type
     [java]          [ERROR] Line 24: The import org.checkerframework cannot be resolved
     [java]          [ERROR] Line 140: Nullable cannot be resolved to a type
     [java]          [ERROR] Line 134: Nullable cannot be resolved to a type
     [java]          [ERROR] Line 78: Nullable cannot be resolved to a type
     [java]    [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the <source> directive in your module to make it accessible


Shawn Brown

unread,
Feb 26, 2021, 6:40:29 AM2/26/21
to google-we...@googlegroups.com
Hey,

     [java]    [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the <source> directive in your module to make it accessible


Did you try making the source accessible?

S

On Friday, February 26, 2021 at 4:52:12 PM UTC+5:30 pratik thaker wrote:
I just realized that this might be because I had remove below line from my gwt.xml file,

<inherits name="com.google.common.collect.Collect"/>

I am checking now.

On Friday, February 26, 2021 at 4:44:31 PM UTC+5:30 pratik thaker wrote:
Hi Team,

We were using GWT 2.7.0 and guava-18 earlier.

Recently we have upgraded to GWT 2.9.0 and we are facing issue in using below classes from guava,

com.google.common.collect.ComparisonChain
com.google.common.collect.Ordering

I tried upgrading to guava-gwt-29.0-jre.jar but for that we are getting below error,

                            [ERROR] Line 373: ComparisonChain cannot be resolved
     [java]             [ERROR] Line 8: The import com.google.common cannot be resolved
     [java]             [ERROR] Line 374: Ordering cannot be resolved
     [java]             [ERROR] Line 7: The import com.google.common cannot be resolved

Can you please help me compile ?

--
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-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/d867e61d-dffc-42f4-9f79-3ec5cb76c19en%40googlegroups.com.

pratik thaker

unread,
Feb 26, 2021, 6:44:54 AM2/26/21
to GWT Users
Hi Shawn,

It is because of org.checkerframework.checker.nullness.qual.Nullable

I don't know how to make it available.

Can you help me with that ?

pratik thaker

unread,
Feb 26, 2021, 8:02:14 AM2/26/21
to GWT Users
I tried with guava 19,20 etc. but all of them are having one or another issue.

Thomas Broyer

unread,
Feb 26, 2021, 10:52:43 AM2/26/21
to GWT Users
It looks like you're not using any tooling to resolve your dependencies (Maven, Gradle, Ivy, Coursier, you name it), so you have to grab the transitives manually (and resolve version conflicts).
I would highly recommend automating this through dedicated tooling though.
Reply all
Reply to author
Forward
0 new messages