Problem with mutatejobservice because of clientlogintoken?

335 views
Skip to first unread message

Shaihulud

unread,
Nov 17, 2013, 8:43:31 AM11/17/13
to adwor...@googlegroups.com
Hi

i am getting the following error for a code the worked for month.

java.lang.NullPointerException: No group found for service: v201306.MutateJobServicejava.lang.NullPointerException: No group found for service: v201306.MutateJobService
        at com.google.api.ads.adwords.lib.conf.AdWordsApiConfiguration.getServiceUrlGroup(AdWordsApiConfiguration.java:63)
        at com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor.getEndpointAddress(AdWordsServiceDescriptor.java:77)
        at com.google.api.ads.common.lib.factory.helper.BaseAdsServiceClientFactoryHelper.createAdsServiceClient(BaseAdsServiceClientFactoryHelper.java:74)
        at com.google.api.ads.common.lib.factory.AdsServiceClientFactory.getServiceClient(AdsServiceClientFactory.java:73)
        at com.google.api.ads.common.lib.factory.BaseAdsServiceClientFactory.getServiceClientAsInterface(BaseAdsServiceClientFactory.java:79)
        at com.google.api.ads.common.lib.factory.BaseServices.get(BaseServices.java:60)


The only thing ive changed is that i switched from v201302 to v201306, but i did not touch the code.

the associated code is this :
[code]
            clientLoginToken = new ClientLoginTokens.Builder()
            .forApi(ClientLoginTokens.Api.ADWORDS)
            .withEmailAndPassword(adwordsLogin, password)
            .build()
            .requestToken();

            // Construct an AdWordsSession.
            AdWordsSession session = new AdWordsSession.Builder()
            .withClientLoginToken(clientLoginToken)
            .withDeveloperToken(developerToken)
            .withClientCustomerId(customerAccount.getClientId())
            .withEndpoint(AdWordsSession.DEFAULT_ENDPOINT).build();

            // mutate job service
            mutateJobService = new AdWordsServices().get(session, MutateJobServiceInterface.class);

            // create list of operations
            adGroupCriterionOperations = new ArrayList<AdGroupCriterionOperation>();
[/code]

ClientloginTokens is deprecated but should still work right? So what seems to be the problem here?
I would appreciate the help.

thx

F.Per

unread,
Nov 18, 2013, 5:20:06 AM11/18/13
to adwor...@googlegroups.com
Funny thing is that i dont get this error starting my application locally and not on the server?!

Josh Radcliff (AdWords API Team)

unread,
Nov 19, 2013, 5:33:59 PM11/19/13
to adwor...@googlegroups.com
Hi,

I've seen this before when the classpath is incorrect or incomplete.  Could you check the following?
  1. You have updated your adwords-api.properties with the latest version
  2. The classpath is the same for both your local and server processes
If that does not highlight the issue, please send on your classpath information from both processes so I can investigate further.

Thanks,
Josh, AdWords API Team

amber.k...@sokrati.com

unread,
Apr 17, 2015, 7:55:40 AM4/17/15
to adwor...@googlegroups.com
Hi I am getting the same error but during migration to v201502.
Could you please help.
I am not using adwords-api-properties file

trace:
java.lang.NullPointerException: No group found for service: v201502.CampaignServicejava.lang.NullPointerException: No group found for service: v201502.CampaignService

at com.google.api.ads.adwords.lib.conf.AdWordsApiConfiguration.getServiceUrlGroup(AdWordsApiConfiguration.java:64)
at com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor.getEndpointAddress(AdWordsServiceDescriptor.java:82)
at com.google.api.ads.common.lib.factory.helper.BaseAdsServiceClientFactoryHelper.createAdsServiceClient(BaseAdsServiceClientFactoryHelper.java:74)
at com.google.api.ads.common.lib.factory.AdsServiceClientFactory.getServiceClient(AdsServiceClientFactory.java:75)
at com.google.api.ads.common.lib.factory.BaseAdsServiceClientFactory.getServiceClientAsInterface(BaseAdsServiceClientFactory.java:79)
at com.google.api.ads.common.lib.factory.BaseServices.get(BaseServices.java:60)

Josh Radcliff (AdWords API Team)

unread,
Apr 17, 2015, 11:21:15 AM4/17/15
to adwor...@googlegroups.com
Hi,

Do you have the adwords-api.properties file in your classpath? That file is required by the client library at runtime.

Thanks,
Josh, AdWords API Team

amber.k...@sokrati.com

unread,
Apr 20, 2015, 10:41:33 AM4/20/15
to adwor...@googlegroups.com
yes it is a part of my classpath

Josh Radcliff (AdWords API Team)

unread,
Apr 20, 2015, 12:51:53 PM4/20/15
to adwor...@googlegroups.com
Hi,

Are you using maven, adding jars to your classpath manually, or using some other approach?

Also, do you see any other exceptions logged before you encounter this issue?

Thanks,
Josh, AdWords API Team

amber.k...@sokrati.com

unread,
Apr 20, 2015, 1:06:59 PM4/20/15
to adwor...@googlegroups.com
using ant, tried adding manually also but did not help.
I'm seeing no exceptions before this.

Josh Radcliff (AdWords API Team)

unread,
Apr 20, 2015, 1:45:36 PM4/20/15
to adwor...@googlegroups.com
Hi,

OK, it's tough for me to diagnose this problem without more information. Could you perhaps send over your build.xml file so I can see exactly how you are setting up your project?

Thanks,
Josh, AdWords API Team

TompiT

unread,
Jun 16, 2015, 9:29:39 AM6/16/15
to adwor...@googlegroups.com
Hi There,

Just an update regarding this error (i.e. No group found for service: v201502) as we got the same issue on our Project.

Currently we're not yet using Maven so we've to add Jars to our classpath manually...

During our migration to v201502 one of the previous Jar was not removed properly and that was the cause of the issue.

With a correct classpath everything is working fine now. 

Regards,

Thomas.
Reply all
Reply to author
Forward
0 new messages