Re: NullPointerException in java client lib 1.12.4

2013-02-26 Thread Minh Tran
Done

https://code.google.com/p/google-api-ads-java/issues/detail?id=47

On Tuesday, February 26, 2013 6:31:23 AM UTC+11, David Torres wrote:

 Hi,

 Thanks a lot for your bug report, do you mind filing it in the library 
 project http://code.google.com/p/google-api-ads-java/issues/list.

 Best,

 - David Torres - AdWords API Team

 On Sunday, February 24, 2013 7:04:48 PM UTC-5, Minh Tran wrote:

 Ok I've resolved this now.

 The reason the NullPointerException occurs is because the try block it is 
 in is assuming that the Soap call executed successfully from earlier, 
 except in my case it didn't. It actually threw an InvocationTargetException 
 at SoapClientHandler.java:109 so you guys need to fix up your client lib to 
 throw this exception back instead of assuming it worked. 

 The reason for the InvocationTargetException was because of this(note the 
 package name refers to a previous version of the api which no longer exists)

 java.lang.ClassNotFoundException: *com.google.api.adwords*
 .lib.AdWordsHttpSender

 Upon more digging around, I noticed in my project I have my own 
 client-config.wsdd file which had this class in it. I removed this file and 
 it finally worked. This project was based on an older version of the api. 
 Not sure if this was documented in the migration docs as it looks like you 
 have removed the old ones from your site, my api version was 201109.

 On Friday, February 22, 2013 3:14:24 PM UTC+11, Minh Tran wrote:

 Hi

 I am running the GetCampaigns class in the java examples and it runs 
 successfully. However I copied it to my own project and ran it from there 
 and I get the following exception. Any ideas?

  Exception in thread main java.lang.NullPointerException

 at com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(
 AxisHandler.java:194)

 at com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(
 SoapServiceClient.java:64)

 at com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(
 SoapServiceClient.java:93)

 at $Proxy14.get(Unknown Source)

 at 
 au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.runExample(
 GetCampaigns.java:76)

 at au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.main(
 GetCampaigns.java:56)


 Upon debugging, at AxisHandler.java:194, the following is null, 
 messageContext.getResponseMessage()


 My pom file has the same inclusions as the one in the examples

 dependency

  groupIdcom.google.api-ads/groupId

  artifactIdads-lib/artifactId

  version1.2.14/version

  /dependency


  dependency

  groupIdcom.google.api-ads/groupId

  artifactIdadwords-axis/artifactId

  version1.2.14/version

  /dependency


  dependency

  groupIdcom.google.http-client/groupId

  artifactIdgoogle-http-client-jackson2/artifactId

  version1.13.1-beta/version

  /dependency



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: NullPointerException in java client lib 1.12.4

2013-02-25 Thread Minh Tran
Ok I've resolved this now.

The reason the NullPointerException occurs is because the try block it is 
in is assuming that the Soap call executed successfully from earlier, 
except in my case it didn't. It actually threw an InvocationTargetException 
at SoapClientHandler.java:109 so you guys need to fix up your client lib to 
throw this exception back instead of assuming it worked. 

The reason for the InvocationTargetException was because of this(note the 
package name refers to a previous version of the api which no longer exists)

java.lang.ClassNotFoundException: *com.google.api.adwords*
.lib.AdWordsHttpSender

Upon more digging around, I noticed in my project I have my own 
client-config.wsdd file which had this class in it. I removed this file and 
it finally worked. This project was based on an older version of the api. 
Not sure if this was documented in the migration docs as it looks like you 
have removed the old ones from your site, my api version was 201109.

On Friday, February 22, 2013 3:14:24 PM UTC+11, Minh Tran wrote:

 Hi

 I am running the GetCampaigns class in the java examples and it runs 
 successfully. However I copied it to my own project and ran it from there 
 and I get the following exception. Any ideas?

  Exception in thread main java.lang.NullPointerException

 at com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(
 AxisHandler.java:194)

 at com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(
 SoapServiceClient.java:64)

 at com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(
 SoapServiceClient.java:93)

 at $Proxy14.get(Unknown Source)

 at 
 au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.runExample(
 GetCampaigns.java:76)

 at au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.main(
 GetCampaigns.java:56)


 Upon debugging, at AxisHandler.java:194, the following is null, 
 messageContext.getResponseMessage()


 My pom file has the same inclusions as the one in the examples

 dependency

  groupIdcom.google.api-ads/groupId

  artifactIdads-lib/artifactId

  version1.2.14/version

  /dependency


  dependency

  groupIdcom.google.api-ads/groupId

  artifactIdadwords-axis/artifactId

  version1.2.14/version

  /dependency


  dependency

  groupIdcom.google.http-client/groupId

  artifactIdgoogle-http-client-jackson2/artifactId

  version1.13.1-beta/version

  /dependency



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.




NullPointerException in java client lib 1.12.4

2013-02-22 Thread Minh Tran
Hi

I am running the GetCampaigns class in the java examples and it runs 
successfully. However I copied it to my own project and ran it from there 
and I get the following exception. Any ideas?

 Exception in thread main java.lang.NullPointerException

at com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(
AxisHandler.java:194)

at com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(
SoapServiceClient.java:64)

at com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(
SoapServiceClient.java:93)

at $Proxy14.get(Unknown Source)

at 
au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.runExample(
GetCampaigns.java:76)

at au.com.appliancesonline.adwords_portal.service.impl.GetCampaigns.main(
GetCampaigns.java:56)


Upon debugging, at AxisHandler.java:194, the following is null, 
messageContext.getResponseMessage()


My pom file has the same inclusions as the one in the examples

dependency

 groupIdcom.google.api-ads/groupId

 artifactIdads-lib/artifactId

 version1.2.14/version

 /dependency


 dependency

 groupIdcom.google.api-ads/groupId

 artifactIdadwords-axis/artifactId

 version1.2.14/version

 /dependency


 dependency

 groupIdcom.google.http-client/groupId

 artifactIdgoogle-http-client-jackson2/artifactId

 version1.13.1-beta/version

 /dependency

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.




AdParamService Java API inconsistencies

2012-02-26 Thread Minh Tran
Hi

When using the AdParamService mutate and get functions, it does not return 
types of ListReturnValue and Page. Every other service returns these types. Why 
is the AdParamService different? 

I have a template class that wraps around all the adwords services and I pass 
these explicit types in. Working fine until I got to this service which isn't 
consistent with everything else.

Thanks 
Minh

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


UNEXPECTED_INTERNAL_API_ERROR on creating TextAds

2012-02-13 Thread Minh Tran
I've been the sandbox for the last month and it has been working ok til today. 
I've attached the request/response/stacktrace as follows. Any ideas?


11:18:31,781 DEBUG com.google.api.adwords.lib.AdWordsUser.soap_xml main - ?xml 
version=1.0 encoding=UTF-8?soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Header
  ns1:RequestHeader soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next; 
soapenv:mustUnderstand=0 
xmlns:ns1=https://adwords.google.com/api/adwords/cm/v201109;
   ns1:authToken 
xmlns:ns1=https://adwords.google.com/api/adwords/cm/v201109;**/ns1:authToken
   ns1:clientCustomerId7731807187/ns1:clientCustomerId
   
ns1:developerTokenDQAAAPkAAAC1qmrjyo5eAl6ZFiZigHr4HuHyHX_pHF02OjH0E31BTxuxPuYPToyrIgN6yOwoAnjA2Lm66o10NmYpZQOML8OcCg4fpFOU_L3BZSUfGYCLDcJvmkxcIC6Zcz4oOgiWiPk6TPVi69WjaEih4pbSQrDOH_-SceNLtqb1NRC4FJLxbTAJ9q9YbCBB-NUHQPGAikaTFZj-xOR9UK2uDtzwL8STkIJDo-Ju1gfpAl4a63PWdVsg4gIW0NHdaRVwFXeEhGv-jlRxi8Wxsmpce7MlFynvCz3UcDIZfRSe7AecNkovFlHgZ-HqMda4aVwErYgxw7TMVJNGl5vmM-ke7tHPM9bP/ns1:developerToken
   ns1:userAgentAdWords API Java Client Library - v - Appliances Online 
Adwords Portal/ns1:userAgent
   ns1:validateOnlyfalse/ns1:validateOnly
   ns1:partialFailurefalse/ns1:partialFailure
  /ns1:RequestHeader
 /soapenv:Header
 soapenv:Body
  mutate xmlns=https://adwords.google.com/api/adwords/cm/v201109;
   operations
operatorADD/operator
operand
 adGroupId3065319783/adGroupId
 ad xsi:type=ns2:TextAd 
xmlns:ns2=https://adwords.google.com/api/adwords/cm/v201109;
  urlhttp://www.NvgAPGCzcA.com.au/url
  displayUrlhttp://www.NvgAPGCzcA.com.au/displayUrl
  headlineuJsVPXsPxv/headline
  description1tgLowQfpwH/description1
  description2NThPBzFpKa/description2
 /ad
/operand
   /operations
  /mutate
 /soapenv:Body
/soapenv:Envelope



11:18:31,790 DEBUG com.google.api.adwords.lib.AdWordsUser.soap_xml main - ?xml 
version=1.0 encoding=UTF-8?soap:Envelope 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;requestId0004b8e188f0e6600a0c98142879/requestIdserviceNameAdGroupAdService/serviceNamemethodNamemutate/methodNameoperations1/operationsresponseTime142/responseTimeunits40/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR
 @ 
com.google.ads.api.services.common.error.InternalApiError.lt;initgt;(InternalApiErro]/faultstringdetailApiExceptionFault
 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;message[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR
 @ 
com.google.ads.api.services.common.error.InternalApiError.lt;initgt;(InternalApiErro]/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
 xsi:type=InternalApiError 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;fieldPath/trigger/errorStringInternalApiError.UNEXPECTED_INTERNAL_API_ERROR/errorStringApiError.TypeInternalApiError/ApiError.TypereasonUNEXPECTED_INTERNAL_API_ERROR/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope
11:18:31,792  WARN 
au.com.appliancesonline.adwords_portal.audit_wrappers.AbstractAuditedAdWordsService
 main - 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode: 
 faultString: [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
com.google.ads.api.services.common.error.InternalApiError.lt;initgt;(InternalApiErro]
 faultActor: 
 faultNode: 
 faultDetail: 

{https://adwords.google.com/api/adwords/cm/v201109}ApiExceptionFault:message[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR
 @ 
com.google.ads.api.services.common.error.InternalApiError.lt;initgt;(InternalApiErro]/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:type=InternalApiErrorfieldPath/trigger/errorStringInternalApiError.UNEXPECTED_INTERNAL_API_ERROR/errorStringApiError.TypeInternalApiError/ApiError.TypereasonUNEXPECTED_INTERNAL_API_ERROR/reason/errors

[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
com.google.ads.api.services.common.error.InternalApiError.init(InternalApiErro]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at 
org.apache.axis.encoding.ser.BeanDeserializer.init(BeanDeserializer.java:104)
at 
org.apache.axis.encoding.ser.BeanDeserializer.init(BeanDeserializer.java:90)