<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tJava component exception stops the job in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298161#M70660</link>
    <description>Hi, 
&lt;BR /&gt;Would you mind uploading your job design screenshots into forum so that we can address your issue quickly.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
    <pubDate>Fri, 11 Apr 2014 03:51:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-11T03:51:31Z</dc:date>
    <item>
      <title>tJava component exception stops the job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298160#M70659</link>
      <description>Hi all, 
&lt;BR /&gt;I did search through talend forums and other blogs but I couldn't came across something that was helpful to me. Here is my use case: 
&lt;BR /&gt;I have created a job where it listens for an xml file in a dir, move it to a working dir and then my tXSLT component transforms it into a json file. I read that json file using the tFileInputJSON component and pass it on to a tJava component (some java code loaded as a library) that parses the file and groups the json objects and then inserts them into some mysql tables. So my java code is actually managing the mysql connections and all the insertions. All working good for me. 
&lt;BR /&gt;Problem: 
&lt;BR /&gt;====== 
&lt;BR /&gt;Though I am catching a bunch of exceptions within java code, but occasionally for certain scenarios an exception would happen and it would cause the job to die. How can I catch these exceptions so that it doesn't stop the actual job? Any input or feedback would be greatly appreciated. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Asher.</description>
      <pubDate>Fri, 11 Apr 2014 00:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298160#M70659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-11T00:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: tJava component exception stops the job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298161#M70660</link>
      <description>Hi, 
&lt;BR /&gt;Would you mind uploading your job design screenshots into forum so that we can address your issue quickly.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 11 Apr 2014 03:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298161#M70660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-11T03:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: tJava component exception stops the job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298162#M70661</link>
      <description>Still have this problem and would appreciate any input..Thanks.
&lt;BR /&gt;
&lt;BR /&gt;Files from the drop directory and moved over to working directory. The files in the working directory are transformed into json files and written to some directory location. If anything goes wrong here, the file gets put in the error directory (tFileCopy_1). I know nothing is going wrong here. The json file then gets parsed for data and that data gets inserted into database tables. Here occasionally some exceptions may occur with the file being processed and if it happens the file gets moved to the error directory. However, the job gets stopped and we have to restart it every time. How can this be avoided if possible.??</description>
      <pubDate>Wed, 27 Aug 2014 02:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298162#M70661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T02:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: tJava component exception stops the job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298163#M70662</link>
      <description>Hi&amp;nbsp; 
&lt;BR /&gt; 
&lt;PRE&gt;Though I am catching a bunch of exceptions within java code, but occasionally for certain scenarios an exception would happen and it would cause the job to die. How can I catch these exceptions so that it doesn't stop the actual job? Any input or feedback would be greatly appreciated.&lt;/PRE&gt; 
&lt;BR /&gt;You need to redesign the job like this: 
&lt;BR /&gt;main job: 
&lt;BR /&gt;.... 
&lt;BR /&gt;&amp;nbsp;| 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt;&amp;nbsp;| 
&lt;BR /&gt;tFileList--iterate--tFileJsonInput--main--tFlowToIterate--iterate--tRunJob 
&lt;BR /&gt;on tRunJob: pass the current data to child job, and uncheck the 'die on error' option to ensure the main job will continue to run even though an exception occurs in the child job.&amp;nbsp; 
&lt;BR /&gt;Child job: 
&lt;BR /&gt;tFixedFlowInput--main--tJava 
&lt;BR /&gt;tFixedFlowInput: generate the current data. 
&lt;BR /&gt;How to pass the current data to child job, see this KB article: 
&lt;BR /&gt; 
&lt;A href="https://help.talend.com/search/all?query=Passing+a+value+from+a+parent+Job+to+a+child+Job&amp;amp;content-lang=en" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/search/all?query=Passing+a+value+from+a+parent+Job+to+a+child+Job&amp;amp;content-lang=en&lt;/A&gt; 
&lt;BR /&gt;I hope this job could give you some hints to achieve your request. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 27 Aug 2014 02:35:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tJava-component-exception-stops-the-job/m-p/2298163#M70662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T02:35:21Z</dc:date>
    </item>
  </channel>
</rss>

