We've just migrated our AdWords API version from v201710 to v201802, and 
for some reason, our AdWordsService is no longer able to get a 
TargetingIdeaService instance. I don't think it has anything to do with our 
AdWords account because we are able to successfully use the exact same code 
below if we roll back the API version to v201710. Has anyone else 
encountered a problem with this?

Code Snippet:

        *TargetingIdeaServiceInterface targetingIdeaService = 
adWordsServices.get(session, TargetingIdeaServiceInterface.class);*

        // Create selector
        TargetingIdeaSelector selector = new TargetingIdeaSelector();
        selector.setRequestType(RequestType.STATS);
        selector.setIdeaType(IdeaType.KEYWORD);
        selector.setRequestedAttributeTypes(new AttributeType[] {
            AttributeType.KEYWORD_TEXT,
            AttributeType.SEARCH_VOLUME});

        // Set selector paging (required for targeting idea service).
        Paging paging = new Paging();
        paging.setStartIndex(0);
        paging.setNumberResults(1000);
        selector.setPaging(paging);

        // Create related to query search parameter.
        RelatedToQuerySearchParameter relatedToQuerySearchParameter = new 
RelatedToQuerySearchParameter();
        relatedToQuerySearchParameter.setQueries(keywords);

        // Location setting
        LocationSearchParameter locationParameter = new 
LocationSearchParameter();
        Location local = new Location();
        local.setId(locationMetric);
        
        LanguageSearchParameter languageParameter = new 
LanguageSearchParameter();
        Language english = new Language();
        english.setId(1000L);
        languageParameter.setLanguages(new Language[] {english});

        // Create network search parameter (optional).
        NetworkSetting networkSetting = new NetworkSetting();
        networkSetting.setTargetGoogleSearch(true);
        networkSetting.setTargetSearchNetwork(false);
        networkSetting.setTargetContentNetwork(false);
        networkSetting.setTargetPartnerSearchNetwork(false);

        NetworkSearchParameter networkSearchParameter = new 
NetworkSearchParameter();
        networkSearchParameter.setNetworkSetting(networkSetting);

        try{
            
            // Get local search volumes
            locationParameter.setLocations(new Location[] {local});

            selector.setSearchParameters(
                new SearchParameter[] {relatedToQuerySearchParameter, 
locationParameter, languageParameter,
                    networkSearchParameter});
            TargetingIdeaPage page = targetingIdeaService.get(selector);
    .
    .
    .
}
catch(Exception ex){
    .
    .
    .
}

Whenever I run this code snippet, I get the following error pointing to the 
line highlighted in red above:

*java.lang.NullPointerException: No group found for service: 
v201802.TargetingIdeaService*
at 
com.google.api.ads.adwords.lib.conf.AdWordsApiConfiguration.getServiceUrlGroup(AdWordsApiConfiguration.java:52)
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:73)
at 
com.google.api.ads.common.lib.factory.AdsServiceClientFactory.getServiceClient(AdsServiceClientFactory.java:76)
at 
com.google.api.ads.common.lib.factory.BaseAdsServiceClientFactory.getServiceClientAsInterface(BaseAdsServiceClientFactory.java:81)
at 
com.google.api.ads.common.lib.factory.BaseServices.get(BaseServices.java:45)

Has anyone else run into this problem with the latest API version?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/8478f174-f75c-46df-bea5-6cfe4be4ef63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Issue ge... hari . patel
    • Re:... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
      • ... hari . patel
        • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum

Reply via email to