batch job service giving operand and error message both as null

146 views
Skip to first unread message

Kainesh Patel

unread,
Nov 13, 2015, 8:49:49 AM11/13/15
to AdWords API Forum
I am trying to update keyword. However, after batch job status is done, when I try to check the status of operand or error, noth are returning null.


Please let me know which all information is required.

Thanks,
Kainesh

Umesh Dengale

unread,
Nov 13, 2015, 12:14:15 PM11/13/15
to AdWords API Forum
Hi Kainesh,

When BatchJob completes, it will have CANCELED or DONE status. If job status is CANCELED then inspect the list of processingErrors on the batch job and download the results for any successfully parsed operations from the batch job's downloadUrl. Please check download the batch job results and check for errors section of the batch processing guide.

Regards,
Umesh, AdWords API Team.

Kainesh Patel

unread,
Nov 13, 2015, 5:12:01 PM11/13/15
to AdWords API Forum
Hi Umesh,

The job status is complete. And as per the guide, I am trying to fetch error or operand. But both are getting as null.

Did the batch job url I shared helped you anyway?

Thanks,
Kainesh

Kainesh Patel

unread,
Nov 16, 2015, 1:54:05 AM11/16/15
to AdWords API Forum
Hi,

I have tried it again to update the keyword.

The xml file after the job is completed is attached with this mail.
However, when I try to do mutateresult[0].getOperand() or mutateResult[0].getErrorList(), I am getting both as null. 

The code used to work, however it is failing now. 

Can you please check into this on priority basis?

Thanks,
Kainesh
1072525.results.xml

Josh Radcliff (AdWords API Team)

unread,
Nov 16, 2015, 10:42:04 AM11/16/15
to AdWords API Forum
Hi,

As specified in the BatchJobOps.xsd schema, the operand will appear under:

mutateResponse/rval/result/

See the section of the XSD with:

<xs:complexType name="MutateResult">
  <xs:sequence>
    <xs:element minOccurs="0" name="result" type="tns:Operand"/>
    <xs:element minOccurs="0" name="errorList" type="tns:ErrorList"/>
    <xs:element minOccurs="0" name="index" type="xs:long"/>
  </xs:sequence>
</xs:complexType>

By the way, are you using the utility supplied in the client library as shown in the examples? It should make uploading operations and processing results much easier.

Thanks,
Josh, AdWords API Team

Kainesh Patel

unread,
Nov 16, 2015, 10:56:44 AM11/16/15
to AdWords API Forum
Hi Josh,

I am using Java client library v201509(which Google provided). As per java client, to fetch operand call is mutateResult[index].getOperand() and to getErrorList, call is mutateResult[index].getErrorList(). However, both are null and operation was successful.

As per xsd schema file, to fetch operand the call should have been mutateResult[index].getResult() which is not there in java file.

The mutateResult which I have referred earlier is  obtained by using mutateResponse.getMutateResults().

The same used to work earlier. Am I making mistake somewhere?

Thanks,
Kainesh

On Friday, November 13, 2015 at 7:19:49 PM UTC+5:30, Kainesh Patel wrote:

Josh Radcliff (AdWords API Team)

unread,
Nov 16, 2015, 11:37:26 AM11/16/15
to AdWords API Forum
Hi Kainesh,

The method call in the Java library to get the operand is mutateResult.getOperand(). I just tried this out locally and it worked as expected. Please give that a shot and let me know how it goes.

Thanks,
Josh, AdWords API Team

Kainesh Patel

unread,
Nov 16, 2015, 11:45:03 AM11/16/15
to AdWords API Forum
Hi Josh,

Even I am trying  the same. But its pointing to null and even I tried mutateResult.getErrorList(), even that is null.

Thanks,
Kainesh

On Friday, November 13, 2015 at 7:19:49 PM UTC+5:30, Kainesh Patel wrote:

Josh Radcliff (AdWords API Team)

unread,
Nov 16, 2015, 12:35:10 PM11/16/15
to AdWords API Forum
Hi Kainesh,

Could you share the code you're using that leads to this result? You can send it only to me (if you'd prefer) by clicking Reply privately to author on this post.

Thanks,
Josh, AdWords API Team

Kainesh Patel

unread,
Nov 17, 2015, 7:45:27 AM11/17/15
to AdWords API Forum
Hi,

I have a send you a mail. Please check it.

Thanks,
Kainesh

Kainesh Patel

unread,
Nov 17, 2015, 8:47:48 AM11/17/15
to AdWords API Forum
Hi Josh,

I have send you mail at adwordsa...@google.com.
Please check it.

Thanks,
Kainesh

Kainesh Patel

unread,
Nov 17, 2015, 12:13:30 PM11/17/15
to AdWords API Forum
Hi Josh,

Any update you would like to share with me?

Thanks,
Kainesh


On Tuesday, November 17, 2015 at 7:17:48 PM UTC+5:30, Kainesh Patel wrote:
Hi Josh,

I have send you mail at adwordsapiadvisor@google.com.

Kainesh Patel

unread,
Nov 18, 2015, 8:10:56 AM11/18/15
to AdWords API Forum
Hi Josh,

As a temporary workaround, we have changed our java version from 

java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)

to

java version "1.6.0_36"
OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~12.04)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

Since both of the versions have same major release and both are 64 bits, it looks strange why it is working with one java version and doesn't in another?

Can you share few differences between OpenJDK and HotStar java.

What does google prefer?

Thanks,
Kainesh

Josh Radcliff (AdWords API Team)

unread,
Nov 18, 2015, 2:09:01 PM11/18/15
to AdWords API Forum
Hi Kainesh,

I'm not an expert on the differences between those JREs, but I can tell you that the BatchJobHelper relies heavily on the XML utilities included in the JRE. It's possible that the older 1.6 JRE you were using had issues in that space, which would explain why upgrading fixed the problem for you.

Cheers,
Josh, AdWords API Team

Kainesh Patel

unread,
Dec 21, 2015, 10:06:21 AM12/21/15
to AdWords API Forum
Hi Josh,

As you have mentioned, BatchJobHelper depends on XML utilities which may or may not be present in JRE. Can you file a ticket/bug or discuss with dev team to include this libraries in google adwords api jar?

Thanks,
Kainesh


On Thursday, November 19, 2015 at 12:39:01 AM UTC+5:30, Josh Radcliff (AdWords API Team) wrote:
Hi Kainesh,

Hi Josh,

I have send you mail at adwordsa...@google.com.

Josh Radcliff (AdWords API Team)

unread,
Dec 21, 2015, 3:32:45 PM12/21/15
to AdWords API Forum
Hi Kainesh,

Those utilities should be present in any JRE. I think the issue you had was that the particular JRE you were using had a bug that meant that the XML wasn't being parsed properly. If it had been an issue with a missing dependency, I think you would have seen a NoClassDefFoundError instead.

Thanks,
Josh, AdWords API Team

Kainesh Patel

unread,
Dec 21, 2015, 3:46:04 PM12/21/15
to AdWords API Forum
Yes. I didn't got NoClassDefFoundError and xml parser didn't worked correctly. By any chance, it can be fixed by importing libraries and if yes, can you can include it in your jar?

Thanks,
Kainesh

Kainesh Patel

unread,
Dec 21, 2015, 4:17:52 PM12/21/15
to AdWords API Forum
Hi Josh,

I planned to migrate from BatchJobService to BulkMutateService (a month back). It worked on my local machine, but it got broke down in production environment, I then have to revert back the changes and came back again to BatchJobService. I was able to do that since BatchJobService wasn't deprecated yet. But 6 months down the line, I won't be able to do that.

So, can you please ask developer community to look into this?

Thanks,
Kainesh



On Tuesday, December 22, 2015 at 2:16:04 AM UTC+5:30, Kainesh Patel wrotet.

Josh Radcliff (AdWords API Team)

unread,
Dec 21, 2015, 4:39:05 PM12/21/15
to AdWords API Forum
Hi Kainesh,

On the production machine where you ran into issues, have you successfully used any of the SOAP services and the report services? I ask because those use many of the same XML utilities used by the BatchJobService utility.

Thanks,
Josh, AdWords API Team

Kainesh Patel

unread,
Dec 21, 2015, 4:42:53 PM12/21/15
to AdWords API Forum
Hi Josh,

We use some of the reporting service. But there are working as expected.

Thanks,
Kainesh

Josh Radcliff (AdWords API Team)

unread,
Dec 21, 2015, 5:10:11 PM12/21/15
to AdWords API Forum
Hi Kainesh,

I took a look at the BatchJobHelper utility, and one thing you might try is specifying an alternate TransformerFactory via the javax.xml.transform.TransformerFactory system property. Per the javadoc:

The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory". This property names a concrete subclass of the TransformerFactory abstract class. If the property is not defined, a platform default is be used.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages