Five Stars

tBufferOutput from subjob is not loaded in Mainjob..

Hi all,

 

I have a mainjob running, in which a subjob is started to get a DigestKey from a webservice. This value is retreived (I checked it with tLogRow in the subjob) , and then stored in a tBufferOutput. However, in the mainjob when I want to set it as variable immediately, it is null.

This problem showed up as soon as I incorporated logging with tStatCatcher in my jobs, because before that, the job was running fine.


Any idea what can be the problem here? Is the buffered output emptied because of the logging running afterwards? Or is something else the problem?

 

I get this message as error when I run it: "Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog."

While, as stated before, without the logging I never got this message.

 

Any ideas? I hope you can help me!

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi all,

 

I found the error that caused this issue.

In the main job, I used as contenttype and accept for the webservice Json, while in the Digestkey subjob I used atom+xml.

So, when I changed the subjob to JSON as well, and consequently also the tConvert and tXMLMap to a tJSONExtract, then this wasn't an issue anymore (now there is another problem again.. but okay.. baby steps Smiley Wink )  .

 

Thanks for the help anyway!

12 REPLIES
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

This is the subjob in which the digestkey is stored in tBufferOutput.. But then not returned in the mainjob..

 

GetDigestKey.PNG

Moderator

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi,

Can you output your digestkey to see if it has been stored in tBufferOutput?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi,

 

I put tLogRow behind the tBufferOutput, and then it shows the digestkey in the output. So it is stored there..

Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

On second thought..

Now I run the whole job, and the tlogrow was still connected to the digest key, and then it shows up empty in the log of the main job..

 

Moderator

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi,

What does your main job look like? Is the attached screenshot your whole work flow?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Yes, the attached job in my first post is the whole job.

Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi,

 

I've run the mainjob while in the subjob GetDigestKey I put several tLogRows, and it seems that in the first 2 tLogRows (4 and 5) the DigestKey is printed, but after the tConvert and tMap the Digestkey disappeared and leaves empty logs.. (tLogRow 3,2 and 1).

While, when I run this subjob alone, the DigestKey is visible in all the tLogRows... so somehow the incorporation in the mainjob causes a problem.
Does this give you any new ideas? Also in combination with the error about content not allowed in Prolog?

 

Kind regards,

Annewieke

 

 

 

 

 

GetDigestKey met LogRows.PNG

Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi all,

 

I found the error that caused this issue.

In the main job, I used as contenttype and accept for the webservice Json, while in the Digestkey subjob I used atom+xml.

So, when I changed the subjob to JSON as well, and consequently also the tConvert and tXMLMap to a tJSONExtract, then this wasn't an issue anymore (now there is another problem again.. but okay.. baby steps Smiley Wink )  .

 

Thanks for the help anyway!

Moderator

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi,

Thanks for posting your solution here. Don't hesitate to post your issue here.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hi, thanks Smiley Happy

 

Well, the next issue is, I get a java.lang.ClassCastException, cannot convert Integer to String..

And it says it's in the tMap_1 (the tMap in the loggin row) but I cannot find where is the error.

And I don't get it, normally I got a synthax error when I misplaced String or Integer, and then I could easily find it back in the Java code where was the problem.
But now the Java code is fine, and I cannot find the error.. I also tried the debugger, but didn't help me so far either, unfortunately..

 

Any tips on how to find this error? Or how to properly debug?

 

Kind regards!

Ten Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Can you show a screenshot of tMap_1? Particularly, I'd focus on the input and output schemas, ensuring that the data types of matching columns line up appropriately.
Five Stars

Re: tBufferOutput from subjob is not loaded in Mainjob..

Hey,

I found the mistake finally, it was in the expression that I put in the tMap.. that is also why it didn't show up as a synthax error, like when I indeed had it mixed up in the input and output Smiley Wink because the job could just be compiled, only when in the tMap, it still encountered the ClassCastException. But okay.. it's solved now.. and finally the total job is working Smiley Very Happy so happy Smiley Tongue