3 messages in com.googlegroups.adwords-apiRe: AdWords API Internal error retry ...
FromSent OnAttachments
Patrick Chanezon14 Jun 2006 14:43 
Michael14 Jun 2006 16:36 
Patrick Chanezon15 Jun 2006 08:16 
Subject:Re: AdWords API Internal error retry again error even with Axis 1 .2RC2 java 1.5 client
From:Patrick Chanezon (chan@gmail.com)
Date:06/14/2006 02:43:32 PM
List:com.googlegroups.adwords-api

Did you try with only adwords-0.3.jar in your classpath? It's all you should need. I ran your code with only that in my calsspath and I got an error 34: the daily budget must be > 10000 After I have set it to 10000 it works, and I get the xml trace. I put the code hereafter (look for P@ in the file for the only line I modified) Your problem must lie elsewhere because you get a code 0 and no trace, which is not nomral.

This makes me think that something must be wrong in your classpath: the adwords-0.3.jar contains the content of other jars: it is possible that you have put similar jars before the adwords jar in your classpath. Please let me know if this is the issue.

P@

import org.apache.axis.client.Stub; import com.google.api.adwords.lib.AdWordsService; import com.google.api.adwords.lib.AdWordsUser; import com.google.api.adwords.lib.AdWordsServiceLogger;

import com.google.api.adwords.v4.Campaign; import com.google.api.adwords.v4.CampaignService; import com.google.api.adwords.v4.AdGroupService; import com.google.api.adwords.v4.CreativeService; import com.google.api.adwords.v4.CriterionService; import com.google.api.adwords.v4.CampaignStatus; import com.google.api.adwords.v4.GeoTarget; import com.google.api.adwords.v4.AdGroup; import com.google.api.adwords.v4.Keyword; import com.google.api.adwords.v4.Criterion; import com.google.api.adwords.v4.KeywordType; import com.google.api.adwords.v4.Creative;

/** * This sample code creates a new campaign then adds an * AdGroup, Creatives and Keywords. * This example also shows how to access your clients accounts * if you are an MCC manager. */ public class CampaignServiceDemo1 {

/* static final String email = "34.@xxxxx.com"; static final String password = "334343erere"; static final String useragent = "xxxxxx: Java AdWords API Demo"; static final String token = "2343434343"; */ // Create a new campaign with some ad groups / public static void main(String args[]) throws Exception {

// This shows how to turn on logging of all the XML that gets sent to // and from the server. This is useful for debugging and support. // You can comment out this line if you don't want to see its (quite // verbose) output. AdWordsServiceLogger.log();

// Create an AdWordsUser which we need to get to the service AdWordsUser me = new AdWordsUser();

// Use the AdWordsUser to get the Services // Get access to the CampaignService CampaignService campaignService = (CampaignService)me.getService(me.CAMPAIGN_SERVICE);

// Get access to the AdGroupsService

AdGroupService adgroupService = (AdGroupService)me.getService(me.AD_GROUP_SERVICE);

// Get access to the CreativeService CreativeService creativeService = (CreativeService)me.getService(me.CREATIVE_SERVICE);

// Get access to the CrtierionService CriterionService criterionService = (CriterionService)me.getService(me.CRITERION_SERVICE);

// Create a new campaign with some ad groups. // First create the campaign so we can get its id. Campaign newCampaign = new Campaign(); //P@ dailyBudget must be at least 10000 //newCampaign.setDailyBudget(new Long(100)); newCampaign.setDailyBudget(new Long(10000)); newCampaign.setName("JustTesting");

// Target the campaign at France and Spain. // Only one kind of geotargeting can be specified. GeoTarget g_target = new GeoTarget(); String[] countries = {"US","IN"}; // g_target.setRegions(regions); g_target.setCountries(countries); newCampaign.setGeoTargeting(g_target);

// Target the campaign at English, French and Spanish. //LanguageTarget l_target= new LanguageTarget(); String[] languages = {"en", "fr", "es"}; //l_target.setLanguages(languages); //newCampaign.setLanguageTargeting(l_target); newCampaign.setLanguageTargeting(languages); //set the campaign status to paused //we don't want to start paying for this test newCampaign.setStatus(CampaignStatus.Paused);

// Add the new campaign. // The campaign object is returned with ids filled in. newCampaign = campaignService.addCampaign(newCampaign); int campaign_id = newCampaign.getId();

System.out.println("The campaign ID :" + campaign_id); } }

On 6/14/06, mza@navicpmart.com <mza@navicpmart.com> wrote:

Hi Patrick,

its not spitting any xml log even though that line is uncommented. I even tried with

AdWordsServiceLogger.logToStream(new FileOutputStream("d:\\adwords.log"));

I made sure commons-logging.jar and log4j-1.2.8.jar are in CLASSPATH.

All it gives is the following exception information:

Exception in thread "main" ApiException Code: 0 Message: An internal error has occurred. Please retry your request.

at com.google.api.adwords.lib.WebServiceWrapper.ajc$inlineAccessMethod$c om_google_api_adwords_lib_WebServiceWrapper$com_google_api_adwords_lib_ApiEx cept ionFactory$convertToApiExceptionIfPossible(WebServiceWrapper.aj) at com.google.api.adwords.v4.CampaignServiceSoapBindingStub.addCampaign_ aroundBody7$advice(CampaignServiceSoapBindingStub.java:130) at com.google.api.adwords.v4.CampaignServiceSoapBindingStub.addCampaign( CampaignServiceSoapBindingStub.java:1) at CampaignServiceDemo.main(CampaignServiceDemo.java:89)

thank you, Michael

-----Original Message----- From: Patrick Chanezon [mailto:chan@gmail.com] Sent: Wednesday, June 14, 2006 12:30 PM To: zadda Cc: AdWords API Forum Subject: Re: AdWords API Internal error retry again error even with Axis 1.2RC2 java 1.5 client

Please uncomment the line

//AdWordsServiceLogger.log();

to AdWordsServiceLogger.log();

to get the xml logs, and send them to the list, after removing the token, email/passwd from the headers.

P@

On 6/14/06, zadda <mza@testmart.com> wrote:

Hi all,

we are still getting this error "internal error, retry " even with Axis 1.2RC2 using toolkit samples given by google. I've checked all the basic CLASSPATH and and AXISCLASSPATH.

Is there a way to print the xml packet from a simple java client? Any help is appreciated.

import org.apache.axis.client.Stub; import com.google.api.adwords.lib.AdWordsService; import com.google.api.adwords.lib.AdWordsUser; import com.google.api.adwords.lib.AdWordsServiceLogger;

import com.google.api.adwords.v4.Campaign; import com.google.api.adwords.v4.CampaignService; import com.google.api.adwords.v4.AdGroupService; import com.google.api.adwords.v4.CreativeService; import com.google.api.adwords.v4.CriterionService; import com.google.api.adwords.v4.CampaignStatus; import com.google.api.adwords.v4.GeoTarget; import com.google.api.adwords.v4.AdGroup; import com.google.api.adwords.v4.Keyword; import com.google.api.adwords.v4.Criterion; import com.google.api.adwords.v4.KeywordType; import com.google.api.adwords.v4.Creative;

/** * This sample code creates a new campaign then adds an * AdGroup, Creatives and Keywords. * This example also shows how to access your clients accounts * if you are an MCC manager. */ public class CampaignServiceDemo {

static final String email = "34.@xxxxx.com"; static final String password = "334343erere"; static final String useragent = "xxxxxx: Java AdWords API Demo"; static final String token = "2343434343"; // Create a new campaign with some ad groups / public static void main(String args[]) throws Exception {

// This shows how to turn on logging of all the XML that gets sent to // and from the server. This is useful for debugging and support. // You can comment out this line if you don't want to see its (quite // verbose) output. //AdWordsServiceLogger.log();

// Create an AdWordsUser which we need to get to the service AdWordsUser me = new AdWordsUser(email,password,token,useragent);

// Use the AdWordsUser to get the Services // Get access to the CampaignService CampaignService campaignService = (CampaignService)me.getService(me.CAMPAIGN_SERVICE);

// Get access to the AdGroupsService

AdGroupService adgroupService = (AdGroupService)me.getService(me.AD_GROUP_SERVICE);

// Get access to the CreativeService CreativeService creativeService = (CreativeService)me.getService(me.CREATIVE_SERVICE);

// Get access to the CrtierionService CriterionService criterionService = (CriterionService)me.getService(me.CRITERION_SERVICE);

// Create a new campaign with some ad groups. // First create the campaign so we can get its id. Campaign newCampaign = new Campaign(); newCampaign.setDailyBudget(new Long(100)); newCampaign.setName("JustTesting");

// Target the campaign at France and Spain. // Only one kind of geotargeting can be specified. GeoTarget g_target = new GeoTarget(); String[] countries = {"US","IN"}; // g_target.setRegions(regions); g_target.setCountries(countries); newCampaign.setGeoTargeting(g_target);

// Target the campaign at English, French and Spanish. //LanguageTarget l_target= new LanguageTarget(); String[] languages = {"en", "fr", "es"}; //l_target.setLanguages(languages); //newCampaign.setLanguageTargeting(l_target); newCampaign.setLanguageTargeting(languages); //set the campaign status to paused //we don't want to start paying for this test newCampaign.setStatus(CampaignStatus.Paused);

// Add the new campaign. // The campaign object is returned with ids filled in. newCampaign = campaignService.addCampaign(newCampaign); int campaign_id = newCampaign.getId();

System.out.println("The campaign ID :" + campaign_id); } }