Search code examples
google-app-enginegoogle-drive-apiguavagoogle-api-java-clientgoogle-contacts-api

Google Contacts, Google Drive on Google App Engine 1.7.5 JAVA


using

gdata-contacts-3.0.jar, 
google-api-services-drive-v2-rev43-1.12.0-beta.jar,
guava-13.0.1.jar

Google Drive works but not Google Contacts. (i tried all kinds of solutions but never got both working together on Google App Engine where as it works in local devmode.)

calling: ContactsService gservice = new ContactsService("...");

Caused by: java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.copyOf([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.(AltFormat.java:49) at com.google.gdata.client.Service.(Service.java:558)


Solution

  • OK now it works. Nobody was able to see that i used to

    Add Google APIs from the Eclipse Plugin.

    This does not only just add new jars that do not work in combination but also leaves all those old ones in a subfolder in my project ".google_apis...". Somehow those made it to Google App Engine and the odyssey started.

    After removing those ... everything works fine. So again and, as everywhere mentioned, i was using a mixed guava version bulk which human nature does not expect to being activated.