Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble with GWT and Guava

Tags:

java

guava

gwt

I am having difficulty make GWT work with Guava. I added guava-r09-gwt.jar to my classpath, and <inherits name="com.google.common.collect.Collect"/> (copied from this question) to my *.gwt.xml file. However, I still get the following error:

[ERROR] Line 99: No source code is available for type com.google.gwt.thirdparty.guava.common.collect.Lists; did you forget to inherit a required module?

The referenced line is:

List<String> suggs = Lists.newArrayList();

If I try the following inherits tag:

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

Then GWT totally fails - going to the app in the browser gives a 404, and no URL appears in Eclipse's development panel.

What am I doing wrong?

like image 663
Nick Heiner Avatar asked Jun 15 '11 06:06

Nick Heiner


1 Answers

You'll notice that com.google.gwt.thirdparty.guava.common.collect.Lists is not actually in the Guava jars. Try instead referencing com.google.common.collect.Lists and you should have some more success.

like image 182
Ray Avatar answered Nov 16 '22 03:11

Ray