<?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: tMap NullPointerException - missing row in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289141#M62555</link>
    <description>Hard to say. It looks like your target column is not nullable. 
&lt;BR /&gt;Could you switch to the Code view and go to the line mentioned in the Exception stack trace.
&lt;BR /&gt;Here you will find a Java assigment and this code post here (please show us the line line number where it happens).</description>
    <pubDate>Wed, 14 May 2014 17:48:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-05-14T17:48:55Z</dc:date>
    <item>
      <title>tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289137#M62551</link>
      <description>I think this is a really easy one, only I seem to lack that piece of knowledge.&lt;BR /&gt;I'm performing a Left Join with data from two tables on one simple id.&lt;BR /&gt;The main flow table sometimes lack a row/id which exists in the lookup table.&lt;BR /&gt;When the job gets to that row/id the tMap throws a&lt;BR /&gt;  Exception in component tMap_3&lt;BR /&gt;  java.lang.NullPointerException&lt;BR /&gt;How do I avoid this?</description>
      <pubDate>Tue, 18 Jun 2013 20:15:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289137#M62551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T20:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289138#M62552</link>
      <description>The main reason for NullPointerException in the tMap is the so called Unboxing of primitive data type wrapper objects. 
&lt;BR /&gt;This means: your read a column which is nullable and write into a column which is not nullable. Especially for numeric data types this leads to this problem. 
&lt;BR /&gt;Lets assume you read an "Integer" (refer to the schema column and check if nullable) and write into a "int" (not nullable). 
&lt;BR /&gt;If you map this the compiler generates this code: row1.my_integer.intValue() 
&lt;BR /&gt;If row1.my_integer is null -&amp;gt; Bang we have the mentioned NullPointerException. 
&lt;BR /&gt;Unfortunately you can only find the causing column if you take a look into the source code (refer to the stack trace of the exception). 
&lt;BR /&gt;To avoid that write this a expression in the output flow: 
&lt;BR /&gt;row1.my_integer != null ? row1.my_integer : 0 
&lt;BR /&gt;This checks the null state and if it is null, it sends a zero to the output flow.</description>
      <pubDate>Tue, 18 Jun 2013 20:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289138#M62552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T20:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289139#M62553</link>
      <description>Thanks!&lt;BR /&gt;This row1.my_integer != null ? row1.my_integer : 0&lt;BR /&gt;in the output flow.&lt;BR /&gt;/Patrick</description>
      <pubDate>Sat, 22 Jun 2013 17:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289139#M62553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-22T17:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289140#M62554</link>
      <description>Hi Jlolling
&lt;BR /&gt;If my target column is Nullable and I want to assign a Null value then what should I do. It throws a null pointer exception even if I am getting a null from the source and my target allows Nulls.
&lt;BR /&gt;I am writing into HDFS and my column is of BigDecimal data type</description>
      <pubDate>Wed, 14 May 2014 17:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289140#M62554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-14T17:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289141#M62555</link>
      <description>Hard to say. It looks like your target column is not nullable. 
&lt;BR /&gt;Could you switch to the Code view and go to the line mentioned in the Exception stack trace.
&lt;BR /&gt;Here you will find a Java assigment and this code post here (please show us the line line number where it happens).</description>
      <pubDate>Wed, 14 May 2014 17:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289141#M62555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-14T17:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289142#M62556</link>
      <description>Hi,&lt;BR /&gt;The following is the code snippet from the code viewer:&lt;BR /&gt;sb_tHDFSOutput_13.append(row21.surplus_factor.toPlainString());&lt;BR /&gt;The column surplus_factor mentioned above is of type BigDecimal and is a nullable columns in the tHDFSOutput. Nulls are coming in from the source and it is trying to do an operation as mentioned above and hence failing. How can I specify a default value of NULL in HDFS in this case.</description>
      <pubDate>Thu, 15 May 2014 22:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289142#M62556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-15T22:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289143#M62557</link>
      <description>Hello,
&lt;BR /&gt;the problem is, a default value does not work here because the default values in the schema are only in use for creating tables statements.
&lt;BR /&gt;I guess the mentioned source code is in the tHDFSOutput component and therefore you cannot change it.
&lt;BR /&gt;In this vase try add a tMap in front of the tHDFSOutput and change the datatype in the output flow to a simple data type like double and fill this output column in the tMap with a expression like this:
&lt;BR /&gt;
&lt;PRE&gt;row21.surplus_factor != null ? row21.surplus_factor.doubleValue() : 0&lt;/PRE&gt;
&lt;BR /&gt;the new output now gets never a null value and therefore should not fail.
&lt;BR /&gt;Good luck.</description>
      <pubDate>Thu, 15 May 2014 23:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289143#M62557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-15T23:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: tMap NullPointerException - missing row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289144#M62558</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;The main reason for NullPointerException in the tMap is the so called Unboxing of primitive data type wrapper objects.&lt;BR /&gt;This means: your read a column which is nullable and write into a column which is not nullable. Especially for numeric data types this leads to this problem.&lt;BR /&gt;Lets assume you read an "Integer" (refer to the schema column and check if nullable) and write into a "int" (not nullable).&lt;BR /&gt;If you map this the compiler generates this code: row1.my_integer.intValue()&lt;BR /&gt;If row1.my_integer is null -&amp;gt; Bang we have the mentioned NullPointerException.&lt;BR /&gt;Unfortunately you can only find the causing column if you take a look into the source code (refer to the stack trace of the exception).&lt;BR /&gt;To avoid that write this a expression in the output flow:&lt;BR /&gt;row1.my_integer != null ? row1.my_integer : 0&lt;BR /&gt;This checks the null state and if it is null, it sends a zero to the output flow.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hello Jlolling. 
&lt;BR /&gt;How can we know which column is causing the this exception . i have all source and target column null able. &amp;nbsp;how we find in stack trace which column is throwing this error as it only shows what column values are getting transported while there is error. even when i go to code i dont see any red mark as we see when there is syntax error. appreciate your help.</description>
      <pubDate>Sun, 21 Feb 2016 14:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-NullPointerException-missing-row/m-p/2289144#M62558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-21T14:52:28Z</dc:date>
    </item>
  </channel>
</rss>

