Want to make Google Adwords API v201809 work with Java 7

57 views
Skip to first unread message

lu zou

unread,
May 9, 2019, 7:44:56 PM5/9/19
to AdWords API and Google Ads API Forum
Hi Team,

Because we are still on Play 1, we cannot upgrade to Java 8. I want to make v201809 work in Java 7. I replaced the lambdas with Functions. The library files compiled OK, but I got some run time errors like this:

2019-05-09 16:16:06,285 ERROR ~ GoogleAdWords: Error fetching client customer id for account ...
java.lang.ExceptionInInitializerError: null
        at clients.google.GoogleAdWords.getClientCustomerId(GoogleAdWords.java:45) [server:na]
        at clients.google.GoogleAdWords.getAdWordsSession(GoogleAdWords.java:59) [server:na]
...
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_80]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_80]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_80]
        at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:557) [play-1.2.7.2.jar:na]
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:508) [play-1.2.7.2.jar:na]
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484) [play-1.2.7.2.jar:na]
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479) [play-1.2.7.2.jar:na]
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161) [play-1.2.7.2.jar:na]
        at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:255) [play-1.2.7.2.jar:na]
        at play.Invoker$Invocation.run(Invoker.java:278) [play-1.2.7.2.jar:na]
        at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:233) [play-1.2.7.2.jar:na]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_80]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_80]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_80]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for com.google.api.ads.common.lib.conf.AdsApiConfiguration was bound.
  while locating com.google.api.ads.common.lib.conf.AdsApiConfiguration
    for parameter 0 at com.google.api.ads.common.lib.soap.RequestInfoXPathSet.<init>(Unknown Source)
  while locating com.google.api.ads.common.lib.soap.RequestInfoXPathSet
    for parameter 1 at com.google.api.ads.common.lib.soap.axis.AxisHandler.<init>(Unknown Source)
  while locating com.google.api.ads.common.lib.soap.axis.AxisHandler
    for parameter 0 at com.google.api.ads.adwords.axis.AdWordsAxisHeaderHandler.<init>(Unknown Source)
  at com.google.api.ads.adwords.axis.AdWordsAxisModule.configure(AdWordsAxisModule.java:38)

2) No implementation for com.google.api.ads.common.lib.conf.AdsApiConfiguration was bound.
  while locating com.google.api.ads.common.lib.conf.AdsApiConfiguration
    for parameter 0 at com.google.api.ads.common.lib.soap.ResponseInfoXPathSet.<init>(Unknown Source)
  while locating com.google.api.ads.common.lib.soap.ResponseInfoXPathSet
    for parameter 2 at com.google.api.ads.common.lib.soap.axis.AxisHandler.<init>(Unknown Source)
  while locating com.google.api.ads.common.lib.soap.axis.AxisHandler
    for parameter 0 at com.google.api.ads.adwords.axis.AdWordsAxisHeaderHandler.<init>(Unknown Source)

What caused the Injector binding errors? Thanks in advance.

- Lulu

googleadsapi...@google.com

unread,
May 9, 2019, 11:25:53 PM5/9/19
to adwor...@googlegroups.com, AdWords API and Google Ads API Forum
Hi Lulu,

Thanks for reaching out.

It appears that your concern is a client library related issue. With this, you may try to reach out the creator/author of the Java client library supported by Google Ads by posting your concern to this link as they are more equipped to provide support to this issue.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/114e1dd0-477d-4a2c-b7b3-696a5229cc96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages