[resolved] Problem using tFileFetch

One Star

[resolved] Problem using tFileFetch

Hi,
I have a problem with a job that uses the tFileFetch component: it dies on error even when the option "die on error" is unchecked.
I try to fetch an xml file from a web service and I would like to keep the job running even if I get a HTTP 503 error (service unavailable). The webservice is called several times using an iterate link and I would like to go on to the next iteration whatever it happened during the previous one.
Can somebody tell me how to achieve that ?
Please see in the attached file the design of my job.
for both component tfilefetch and txmlinput the option "die on error" is unchecked.
Thanks.
Maxime.

Accepted Solutions
Community Manager

Re: [resolved] Problem using tFileFetch

Hi
tFileInputXML is a input component, the option 'die on error' role in the row level, not the component level, however the exception in your case is NPE, it occurs at the beginning of component, before the rows iteration of XML file.
Anyway, you get the job works as expected now. Smiley Wink
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] Problem using tFileFetch

Hi
If the option 'die on error' is unchecked, in fact, the job do still continue to execute next iterate, not die even though there are some red message on console, take a look at the statistics of row, you will see how many iterations finished.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Problem using tFileFetch

Hi Shong,
I am sorry but in this case it does not execute the next iteration, it stops.
I actually do have other jobs that do not die but curiously this one does..
I am thinking that maybe the problem actually comes from the tXMLInput component because of the "ignore namespaces" option, as it is the only job where I use it.
Maybe because of the webservice error the XML temp file can not be created so the tXMLInput component runs into an error, is it possible?
Thanks,
Maxime.
Community Manager

Re: [resolved] Problem using tFileFetch

Hi
From the images, I seen the exception message 'exception in component tFileInputXML_1 and I confirm that the problem come from the tFileInputXML, the job throws the exception and die.
To achieve your request, you have to redesign the job as below:
parent job:
tMysqlInput--main--tJavaRow--main-->tFlowToIterate--iterate--tRunJob
on tRunJob: call the child job, uncheck the option 'die on error', pass each row to child job using context variable if needed.
child job:
tFileFetch
|
onsubjobok
|
tFileInputXML--main--tMap--tMysqlOutput
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Problem using tFileFetch

Thanks a lot Shong, it works fine but I still don't understand why the tfileXMLInput dies even if the "die on error" option is unchecked Smiley Wink
Regards,
Maxime.
Community Manager

Re: [resolved] Problem using tFileFetch

Hi
tFileInputXML is a input component, the option 'die on error' role in the row level, not the component level, however the exception in your case is NPE, it occurs at the beginning of component, before the rows iteration of XML file.
Anyway, you get the job works as expected now. Smiley Wink
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business