<?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: When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336395#M104844</link>
    <description>Hi Boris,
&lt;BR /&gt;Sorry for the delay, you did well to ping me.
&lt;BR /&gt;Actually I'm not sure why this takes so long. I've submitted your case to the dev team. But send over the file if you don't mind, we can try to reproduce that.
&lt;BR /&gt;Just a quick question: in this job you don't do anything else but reading the file and displaying it on the console right? (like it seems on your screenshot).</description>
    <pubDate>Fri, 23 May 2014 11:23:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-05-23T11:23:32Z</dc:date>
    <item>
      <title>When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336392#M104841</link>
      <description>Hi, 
&lt;BR /&gt;I need to import data from a 10MB JSON file into a mySQL DB, but I'm running out of memory : 
&lt;BR /&gt;Exception in thread "main" java.lang.OutOfMemoryError: Java heap space 
&lt;BR /&gt; at java.util.Arrays.copyOf(Arrays.java:2367) 
&lt;BR /&gt; at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) 
&lt;BR /&gt; at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) 
&lt;BR /&gt; at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415) 
&lt;BR /&gt; at java.lang.StringBuffer.append(StringBuffer.java:237) 
&lt;BR /&gt; at org.json.simple.JSONArray.toJSONString(Unknown Source) 
&lt;BR /&gt; at org.json.simple.JSONArray.toJSONString(Unknown Source) 
&lt;BR /&gt; at org.json.simple.JSONArray.toString(Unknown Source) 
&lt;BR /&gt; at projet_nfe212_velibs.dynamicdata_0_1.DynamicData.tFileList_1Process(DynamicData.java:687) 
&lt;BR /&gt; at projet_nfe212_velibs.dynamicdata_0_1.DynamicData.runJobInTOS(DynamicData.java:1054) 
&lt;BR /&gt; at projet_nfe212_velibs.dynamicdata_0_1.DynamicData.main(DynamicData.java:919) 
&lt;BR /&gt;I don't know how to raise the memory, if possible. I have found a couple of other posts, but did not really find a solution to my problem. ex: ?Defining the maximum memory size threshold?. 
&lt;BR /&gt; 
&lt;BR /&gt;Help please? 
&lt;BR /&gt;Boris 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDvx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133774i38206300AB5CF8BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDvx.png" alt="0683p000009MDvx.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 16 May 2014 14:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336392#M104841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-16T14:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336393#M104842</link>
      <description>Hi, 
&lt;BR /&gt;Have you found the following KB articles already about java heap space: 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/article/ka03p0000006EZuAAM"&gt;https://community.talend.com/t5/Migration-Configuration-and/OutOfMemory-Exception/ta-p/21669?content-lang=en&lt;/A&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/article/ka03p0000006Ea3AAE"&gt;https://community.talend.com/t5/Design-and-Development/Could-not-reserve-enough-space-for-object-heap-exception/ta-p/21680?content-lang=en&lt;/A&gt; 
&lt;BR /&gt;Elisa</description>
      <pubDate>Fri, 16 May 2014 14:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336393#M104842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-16T14:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336394#M104843</link>
      <description>Thank you esabot, 
&lt;BR /&gt;these articles helped to go one step further! I raised the memory for the job specifying -Xmx2048M as advised in the first article. I appreciate your reactivity! 
&lt;BR /&gt;However, I am still in trouble with this job. When running it, it now succeed where it used to crash but then the memory allocation goes bersek (it allocates more than 2Go) and the job takes forever. Eventually, it crashes after a long while ruining my last hopes. 
&lt;BR /&gt;I thought my JSONPath request was incorrect, but the same request works fine with smaller subsets of the original JSON file. I don't think the file is corrupted because it works fine with JQ (a terminal tool to manipulate JSON files). So my two questions? 
&lt;BR /&gt;1- Why Talend needs to allocate more than 2Go for a standard 100MB JSON file (not 10MB as previously mentionned)? 
&lt;BR /&gt;2- Why is it so slow while it takes two seconds with JQ on my bash terminal? 
&lt;BR /&gt;I can provide the JSON file if it can help. My config is a MacBook Pro 2010 with 4Go of RAM, with Maverick and Talend Open Studio 5.4 
&lt;BR /&gt;Many thanks for your help! 
&lt;BR /&gt;Boris</description>
      <pubDate>Fri, 16 May 2014 19:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336394#M104843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-16T19:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336395#M104844</link>
      <description>Hi Boris,
&lt;BR /&gt;Sorry for the delay, you did well to ping me.
&lt;BR /&gt;Actually I'm not sure why this takes so long. I've submitted your case to the dev team. But send over the file if you don't mind, we can try to reproduce that.
&lt;BR /&gt;Just a quick question: in this job you don't do anything else but reading the file and displaying it on the console right? (like it seems on your screenshot).</description>
      <pubDate>Fri, 23 May 2014 11:23:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336395#M104844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-23T11:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: When using tFileInputJson, java.lang.OutOfMemoryError: Java heap space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336396#M104845</link>
      <description>Hi Esabot,
&lt;BR /&gt;Here is a link to the json file
&lt;BR /&gt;
&lt;A href="https://dl.dropboxusercontent.com/u/81994364/velib_2013-12-01.jsonr.gz" rel="nofollow noopener noreferrer"&gt;https://dl.dropboxusercontent.com/u/81994364/velib_2013-12-01.jsonr.gz&lt;/A&gt;
&lt;BR /&gt;It is structured like this : ,,,...]
&lt;BR /&gt;The job is the simplest test case and it fails every time. I just import one field of the json file using the JSONPath="$..available_bikes" (same for other fields...). I use a tFileList, a tFileInputJSON and a tLogRow.
&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 23 May 2014 23:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/When-using-tFileInputJson-java-lang-OutOfMemoryError-Java-heap/m-p/2336396#M104845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-23T23:11:16Z</dc:date>
    </item>
  </channel>
</rss>

