Search code examples
google-app-engineguavagdatagoogle-sheets

Guava - gdata libraries incompatibility


I copied guava-11.0.2 from gdata-java-client/gdata/java/deps/ when using google spreadsheets as described here/Setting up your client library (Java tab). This version of guava is actually bundled within gdata-src.java-1.47.1.zip. Everything worked fine in development However once I deployed to the app engine, I got this error at runtime.

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399)
at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387)
at com.google.gdata.wireformats.AltFormat.<clinit>(AltFormat.java:49)
at com.google.gdata.client.Service.<clinit>(Service.java:558)

...


Solution

  • Solution: I replaced the guava library to the older version - guava-10.0.1.jar to fix the issue.