<?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: getting NULL pointer exception error in tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203936#M5011</link>
    <description>Hello
&lt;BR /&gt;
&lt;BR /&gt;You need to handle null values or reverse your condition
&lt;BR /&gt;
&lt;BR /&gt;“1”.equals(row...) || ....
&lt;BR /&gt;
&lt;BR /&gt;General rule is to check null value before using it in any java expression</description>
    <pubDate>Fri, 05 Jun 2020 18:11:09 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2020-06-05T18:11:09Z</dc:date>
    <item>
      <title>getting NULL pointer exception error in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203935#M5010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have flags logic as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&amp;amp;&amp;amp; row7.SKU.startsWith("DE-TB")?"Y":"N"&lt;BR /&gt;(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&amp;amp;&amp;amp; row7.SKU.startsWith("DE-PS")?"Y":"N"&lt;BR /&gt;(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&amp;amp;&amp;amp; row7.SKU.startsWith("DE-LB")?"Y":"N"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&amp;amp;&amp;amp;(row5.ordernumber!=null)?"Y":"N"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but because of these conditions i keep getting error&lt;/P&gt;
&lt;P&gt;Exception in component tMap_1 (job_DM_000_Order)&lt;BR /&gt;java.lang.NullPointerException.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you suggest why this is happenign and how do i handle this?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203935#M5010</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2024-11-16T02:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: getting NULL pointer exception error in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203936#M5011</link>
      <description>Hello
&lt;BR /&gt;
&lt;BR /&gt;You need to handle null values or reverse your condition
&lt;BR /&gt;
&lt;BR /&gt;“1”.equals(row...) || ....
&lt;BR /&gt;
&lt;BR /&gt;General rule is to check null value before using it in any java expression</description>
      <pubDate>Fri, 05 Jun 2020 18:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203936#M5011</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2020-06-05T18:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: getting NULL pointer exception error in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203937#M5012</link>
      <description>&lt;P&gt;Hello Sushant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to handle null value when you are executing the job. Since equals, startwith are in built routine and whenever null value comes theses are not able to compare and throughs null pointer exception.&lt;BR /&gt;Try this it will work&lt;BR /&gt;(row6.paymentstate_id.equals("") || RELATIONAL.ISNULL(row6.paymentstate_id)) &amp;amp;&amp;amp; (row7.SKU.equals("") || RELATIONAL.ISNULL(row7.SKU)) ? "" : (row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&amp;amp;&amp;amp; row7.SKU.startsWith("DE-TB")?"Y":"N"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 15:07:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203937#M5012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-06T15:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: getting NULL pointer exception error in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203938#M5013</link>
      <description>&lt;P&gt;yes, that worked now. Actually I didnt handle NULL values first.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 07:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-NULL-pointer-exception-error-in-tmap/m-p/2203938#M5013</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2020-06-08T07:12:17Z</dc:date>
    </item>
  </channel>
</rss>

