why is ads-lib 2.21.0 requiring guava 20.0-rc1 ?

464 views
Skip to first unread message

Christian H.

unread,
Nov 2, 2016, 11:06:41 AM11/2/16
to AdWords API Forum
Hi,

After updating adwords-axis to 2.21., I got the error
   java.lang.NoClassDefFoundError: Could not initialize class com.google.api.ads.common.lib.auth.OfflineCredentials$Api

The reason for that seems to be
  java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkNotNull(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
    at com.google.api.ads.common.lib.auth.OfflineCredentials$Api.<init>(OfflineCredentials.java:76)
    at com.google.api.ads.common.lib.auth.OfflineCredentials$Api.<clinit>(OfflineCredentials.java:66)

I am using Guava 19, where this method is not present.

Is it really necessary to use a release candidate as dependency (especially when the other dependency guice 4.0 is still compiled against guava 16.0.1)?

Best regards

Christian

Vishal Vinayak (Adwords API Team)

unread,
Nov 2, 2016, 3:22:19 PM11/2/16
to AdWords API Forum
Hi Christian,

I can see that the ads-lib dependency in the pom of the main project internally uses guava 20.0-rc1. I'm not entirely sure why that is the case. Since your question is related to the Java client library in particular, I would recommend opening a new issue here.

Regards,
Vishal, AdWords API Team

Christian H.

unread,
Nov 3, 2016, 3:04:38 AM11/3/16
to AdWords API Forum
Hi Vishal,

thanks for providing the link. It seems that the issue will be fixed in the next release: https://github.com/googleads/googleads-java-lib/issues/101

Regards

Christian
Reply all
Reply to author
Forward
0 new messages