<?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: [resolved] What is a NullPointerException and How to fix it? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320896#M90989</link>
    <description>Thanks, 
&lt;BR /&gt;I have scenario here where I have integers and floats in the csv file and it contains blanks ("") values in the column fields. 
&lt;BR /&gt; 
&lt;BR /&gt;So I am transforming them in tMap. I have all of those designated columns as strings and transforming them as follows: 
&lt;BR /&gt; 
&lt;BR /&gt;row1.Base_Price.equals.("") ? null : Integer.parseInt(row1.Base_Price) 
&lt;BR /&gt;or 
&lt;BR /&gt;row1.Bank_Payoff.equals("") ? null : Float.parseFloat(row1.Bank_Payoff) 
&lt;BR /&gt; 
&lt;BR /&gt;I repeated the above procedures for most of the fields with null ("") values but I kept getting this error: 
&lt;BR /&gt; 
&lt;BR /&gt;Java Exception: "Data Guy".......Float.parseFloat.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;I went back to check the Bank_Payoff and it was String being transformed into Float simple a 1-2-3 ETL job but after I couldn't get around this error I decided to convert everything back to string at the database level and see what the problem is: 
&lt;BR /&gt; 
&lt;BR /&gt;Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Base_Price &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bank_Payoff &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Salesman &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 
&lt;BR /&gt;1/1/2017 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 235987.54 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Talend Guy 
&lt;BR /&gt;2/2/2018 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;353699 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1264.90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ETL Guy 
&lt;BR /&gt;3/3/2016 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;654290 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Data Guy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ............ 
&lt;BR /&gt; 
&lt;BR /&gt;I do not know what is going on here.&amp;nbsp; 
&lt;BR /&gt;Interesting part is when I changed all the designated columns to strings and imported the csv file to the database. The Bank_Payoff field when it sees a null ("") value, it takes the value from the next chronological column and displays as it's own value. 
&lt;BR /&gt; 
&lt;BR /&gt;Now I decided to convert them back to integers and floats as I did previously and currently, I am running into NullPointerException Error. 
&lt;BR /&gt; 
&lt;BR /&gt;Please provide some insights on this peculiar behavior of Talend.</description>
    <pubDate>Tue, 24 Jan 2017 04:22:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-24T04:22:08Z</dc:date>
    <item>
      <title>[resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320894#M90987</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Can someone please tell me what a Null Pointer Exception is and how to fix it?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 23:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320894#M90987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-23T23:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320895#M90988</link>
      <description>A nullpointerexception occurs when a Java object references null....or nothing. A simple example is a String object. If we create a String object as below....&lt;BR /&gt;&lt;PRE&gt;String myString = null;&lt;/PRE&gt;&lt;BR /&gt;....we have created a String object that references nothing. Since it references nothing, we cannot invoke any of a String's methods. If we do, we will get a NullPointerException. There is nothing to invoke.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In order to prevent this in Talend, you can carry out some simple logic to prevent doing this. An example of this is below.&lt;BR /&gt;&lt;BR /&gt;Lets assume I want to find the length of the String value, but I am not sure if it has a value. Let's assume the String is a column called myString. We need to check to see whether it is null first and then check the length. If it is null we will say the length is 0. This is done as below...&lt;BR /&gt;&lt;PRE&gt;row1.myString!=null ? row1.myString.length() : 0&lt;/PRE&gt;&lt;BR /&gt;The above Java says "If row1.myStrng is not null, then use the length() method to retrieve the String length. Else, we will say the length is 0".</description>
      <pubDate>Tue, 24 Jan 2017 00:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320895#M90988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T00:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320896#M90989</link>
      <description>Thanks, 
&lt;BR /&gt;I have scenario here where I have integers and floats in the csv file and it contains blanks ("") values in the column fields. 
&lt;BR /&gt; 
&lt;BR /&gt;So I am transforming them in tMap. I have all of those designated columns as strings and transforming them as follows: 
&lt;BR /&gt; 
&lt;BR /&gt;row1.Base_Price.equals.("") ? null : Integer.parseInt(row1.Base_Price) 
&lt;BR /&gt;or 
&lt;BR /&gt;row1.Bank_Payoff.equals("") ? null : Float.parseFloat(row1.Bank_Payoff) 
&lt;BR /&gt; 
&lt;BR /&gt;I repeated the above procedures for most of the fields with null ("") values but I kept getting this error: 
&lt;BR /&gt; 
&lt;BR /&gt;Java Exception: "Data Guy".......Float.parseFloat.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt;I went back to check the Bank_Payoff and it was String being transformed into Float simple a 1-2-3 ETL job but after I couldn't get around this error I decided to convert everything back to string at the database level and see what the problem is: 
&lt;BR /&gt; 
&lt;BR /&gt;Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Base_Price &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bank_Payoff &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Salesman &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 
&lt;BR /&gt;1/1/2017 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 235987.54 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Talend Guy 
&lt;BR /&gt;2/2/2018 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;353699 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1264.90 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ETL Guy 
&lt;BR /&gt;3/3/2016 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;654290 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Data Guy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ............ 
&lt;BR /&gt; 
&lt;BR /&gt;I do not know what is going on here.&amp;nbsp; 
&lt;BR /&gt;Interesting part is when I changed all the designated columns to strings and imported the csv file to the database. The Bank_Payoff field when it sees a null ("") value, it takes the value from the next chronological column and displays as it's own value. 
&lt;BR /&gt; 
&lt;BR /&gt;Now I decided to convert them back to integers and floats as I did previously and currently, I am running into NullPointerException Error. 
&lt;BR /&gt; 
&lt;BR /&gt;Please provide some insights on this peculiar behavior of Talend.</description>
      <pubDate>Tue, 24 Jan 2017 04:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320896#M90989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T04:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320897#M90990</link>
      <description>The problem is that if&amp;nbsp;&lt;BR /&gt;&lt;PRE&gt;row1.Base_Price == null&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Java is not able to evaluate function&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;row1.Base_Price.equals()&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Try to:&lt;BR /&gt;&lt;PRE&gt;row1.Base_Price == null ? 0 : Integer.parseInt(row1.Base_Price)&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jan 2017 08:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320897#M90990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T08:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320898#M90991</link>
      <description>If.....&lt;BR /&gt;&lt;PRE&gt;&amp;nbsp;row1.Bank_Payoff.equals("") ? null : Float.parseFloat(row1.Bank_Payoff)&amp;nbsp;&lt;/PRE&gt;&lt;BR /&gt;....is failing with the error you showed, it suggests that row1.Bank_Payoff is null and not an empty String (""). I just thought I would add that. Otherwise what silverhand has said is what I would do.</description>
      <pubDate>Tue, 24 Jan 2017 09:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320898#M90991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320899#M90992</link>
      <description>Thanks guys, something funny is happening in Talend. It still shows me the Null Pointer Exception but not the field.
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;Exception in component tMap_1
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;java.lang.NullPointerException
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;at rehearsalproject.datainputcombo_0_1.Datainputcombo.tFileInputDelimited_1Process(Datainputcombo.java:3748)
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;at rehearsalproject.datainputcombo_0_1.Datainputcombo.runJobInTOS(Datainputcombo.java:4926)
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;at rehearsalproject.datainputcombo_0_1.Datainputcombo.main(Datainputcombo.java:4726)
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;[statistics] disconnected
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://community.talend.com/legacyfs/online/398498/Capture_20170124-0746.png" target="_blank"&gt;&lt;IMG src="https://community.talend.com/legacyfs/online/398498/Capture_20170124-0746.png" /&gt;&lt;/A&gt;</description>
      <pubDate>Tue, 24 Jan 2017 15:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320899#M90992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T15:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320900#M90993</link>
      <description>This isn't funny, it is pretty standard. You can find the problem by going to the code tab (bottom left hand corner of the screen) and going to line&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;3748 of the code. Can you show us that code and we can help you from there.&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 24 Jan 2017 16:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320900#M90993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T16:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320901#M90994</link>
      <description>Thanks, do you mean the code viewer....
&lt;BR /&gt;
&lt;A href="https://community.talend.com/legacyfs/online/398498/Capture_20170124-0822.png" target="_blank"&gt;&lt;IMG src="https://community.talend.com/legacyfs/online/398498/Capture_20170124-0822.png" /&gt;&lt;/A&gt;
&lt;BR /&gt;Once I click on it I do not see any line numbers only columns I am trying to export into the database.</description>
      <pubDate>Tue, 24 Jan 2017 16:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320901#M90994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T16:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320902#M90995</link>
      <description>No, the code tab which sits in the bottom left corner of the design window (Designer|Code|Jobscript) .....JobScript will only appear in the Enterprise Edition, otherwise it will show (Designer|Code).</description>
      <pubDate>Tue, 24 Jan 2017 16:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320902#M90995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T16:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320903#M90996</link>
      <description>Thanks, I see the code now but I do not know how to get to the line Datainputcombo.java:3748 since the code is not numbered and the code contains lots of lines. Do you how I can have the line numbers to be displayed?
&lt;BR /&gt;
&lt;BR /&gt;I appreciate your kind assistance!!!</description>
      <pubDate>Tue, 24 Jan 2017 16:51:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320903#M90996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T16:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320904#M90997</link>
      <description>You'll see a think grey margin down the left side of the code page. Right click this and select "Show Lline Numbers"</description>
      <pubDate>Tue, 24 Jan 2017 16:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320904#M90997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T16:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] What is a NullPointerException and How to fix it?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320905#M90998</link>
      <description>Thank you so much, you have made my day!!!!</description>
      <pubDate>Tue, 24 Jan 2017 18:03:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-What-is-a-NullPointerException-and-How-to-fix-it/m-p/2320905#M90998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T18:03:59Z</dc:date>
    </item>
  </channel>
</rss>

