<?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: Unreliable results from tRESTClient? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343577#M111322</link>
    <description>Hi, 
&lt;BR /&gt;Could you please open a work item jira issue of DI project on 
&lt;A href="https://jira.talendforge.org/secure/Dashboard.jspa" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendBugTracker&lt;/A&gt; so that our component developer will check it to see if there is a solution for your issue.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
    <pubDate>Mon, 28 Apr 2014 04:33:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-28T04:33:36Z</dc:date>
    <item>
      <title>Unreliable results from tRESTClient?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343574#M111319</link>
      <description>I have tRESTClient in a subjob. The parent job loops through pages on a web service (changing the ?Page= parameter on the URL) and everything works fine -- until it doesn't. 
&lt;BR /&gt;I have had errors: 
&lt;BR /&gt;WARNING: Interceptor for {&amp;lt;url&amp;gt;?Page=115}tRESTClient has thrown exception, unwinding now 
&lt;BR /&gt;org.apache.cxf.interceptor.Fault: Could not send Message 
&lt;BR /&gt;WARNING: Interceptor for {&amp;lt;different url endpoint&amp;gt;?Page=89}tRESTClient has thrown exception, unwinding now 
&lt;BR /&gt;org.apache.cxf.interceptor.Fault: Could not send Message 
&lt;BR /&gt;&amp;lt;page 136 end | success&amp;gt; 
&lt;BR /&gt;Exception in component tRESTClient_1 
&lt;BR /&gt;javax.ws.rs.ServiceUnavailableException 
&lt;BR /&gt;all of which I suspect are caused by problems with the server I am attempting to access. 
&lt;BR /&gt;All requests work perfectly WHEN THEY ARE RERUN. 
&lt;BR /&gt;How can I get more reliable results from a (possibly) unreliable REST service?</description>
      <pubDate>Wed, 23 Apr 2014 02:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343574#M111319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-23T02:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unreliable results from tRESTClient?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343575#M111320</link>
      <description>Hi, 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;all of which I suspect are caused by problems with the server I am attempting to access.&lt;BR /&gt;All requests work perfectly WHEN THEY ARE RERUN.&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;This exception is random? Is there any time-out setting on this server?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 25 Apr 2014 09:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343575#M111320</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-25T09:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unreliable results from tRESTClient?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343576#M111321</link>
      <description>Yes. The fault appears at random. A response from this server normally completes a 13MB download in 90 seconds. I had used Advanced Settings in my tRESTClient to set a Connection timeout of 600 seconds and a Receive timeout of 600 seconds. There is no indication the problems result due to a Talend timeout as the errors are thrown well within these 10 minute windows.
&lt;BR /&gt;To work around this problem, I have used a tJava node connected to the tRESTClient using an OnComponentError trigger and written a separate bash script wrapper for the .sh script exported from Talend. The tJava node writes the failed page number to a file (page_to_restrart) and exits with status code of 1:
&lt;BR /&gt; BufferedWriter writer = null;
&lt;BR /&gt; try {
&lt;BR /&gt; File logFile = new File("page_to_restart");
&lt;BR /&gt; // This will output the full path where the file will be written to...
&lt;BR /&gt; System.out.println(logFile.getCanonicalPath());
&lt;BR /&gt; writer = new BufferedWriter(new FileWriter(logFile));
&lt;BR /&gt; writer.write(Integer.toString(context.page)+"\n");
&lt;BR /&gt; } catch (Exception e) {
&lt;BR /&gt; e.printStackTrace();
&lt;BR /&gt; } finally {
&lt;BR /&gt; try {
&lt;BR /&gt; // Close the writer regardless of what happens...
&lt;BR /&gt; writer.close();
&lt;BR /&gt; } catch (Exception e) {
&lt;BR /&gt; }
&lt;BR /&gt; }
&lt;BR /&gt; System.exit(1);
&lt;BR /&gt;The bash script tests for the status_code being 1 and restarts on the failed page. Over the course of downloading 222 pages, the server failed 7 times in my latest run.</description>
      <pubDate>Sun, 27 Apr 2014 21:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343576#M111321</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-27T21:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unreliable results from tRESTClient?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343577#M111322</link>
      <description>Hi, 
&lt;BR /&gt;Could you please open a work item jira issue of DI project on 
&lt;A href="https://jira.talendforge.org/secure/Dashboard.jspa" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendBugTracker&lt;/A&gt; so that our component developer will check it to see if there is a solution for your issue.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 28 Apr 2014 04:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Unreliable-results-from-tRESTClient/m-p/2343577#M111322</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-28T04:33:36Z</dc:date>
    </item>
  </channel>
</rss>

