<?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: Trouble with NullPointerException during job run in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234086#M23571</link>
    <description>Hi, 
&lt;BR /&gt;thanks for the suggestion. It appears that it is taking offense this code block:
&lt;BR /&gt;Var.Points = (java.lang.Math.round(row1.TransactionAmount))* row1.Multiplier;
&lt;BR /&gt;The actual line of code that is throwing it appears to be the rounding step. Do I just have to write some code to check if that input is null before performing the operation?
&lt;BR /&gt;- Mike</description>
    <pubDate>Tue, 05 Jun 2012 18:55:21 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2012-06-05T18:55:21Z</dc:date>
    <item>
      <title>Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234082#M23567</link>
      <description>Hi, 
&lt;BR /&gt;I'm having trouble getting my job to complete. During the middle of the job run, I appear to hit a nullpointer exception. I appear to successfully complete a lookup from one of my database tables, but when I try to use that data and data from a delimited file I have loaded, it catches the null pointer and quits before successfully uploading the data to my database. 
&lt;BR /&gt;Below is the output code when I try to run the program: 
&lt;BR /&gt;---------------------------------------------------------------------------------------------- 
&lt;BR /&gt;Starting job Transaction_Processing at 13:08 04/06/2012. 
&lt;BR /&gt; connecting to socket on port 4079 
&lt;BR /&gt; connected 
&lt;BR /&gt;Exception in component tMap_1_TMAP_IN 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt; at bonusme.transaction_processing_0_1.Transaction_Processing.tFileList_1Process(Transaction_Processing.java:3461) 
&lt;BR /&gt; at bonusme.transaction_processing_0_1.Transaction_Processing.tMysqlConnection_1Process(Transaction_Processing.java:522) 
&lt;BR /&gt; at bonusme.transaction_processing_0_1.Transaction_Processing.runJobInTOS(Transaction_Processing.java:7970) 
&lt;BR /&gt; at bonusme.transaction_processing_0_1.Transaction_Processing.main(Transaction_Processing.java:7831) 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;Job Transaction_Processing ended at 13:08 04/06/2012. 
&lt;BR /&gt;---------------------------------------------------------------------------------------------- 
&lt;BR /&gt;Any ideas on how to resolve this issue? Thanks for the help. 
&lt;BR /&gt;- Mike</description>
      <pubDate>Mon, 04 Jun 2012 21:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234082#M23567</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-06-04T21:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234083#M23568</link>
      <description>Hi Mike
&lt;BR /&gt;Could you upload a screenshot of tMap?
&lt;BR /&gt;I guess there are some expressions in it which causes NPE exception.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 05 Jun 2012 03:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234083#M23568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T03:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234084#M23569</link>
      <description>Hi, 
&lt;BR /&gt;Here is a screenshot of most of my tmap. I have two output tables. One that take the inner join successes and one that takes the inner join rejects. I don't need to fill each of the columns though. Some will simply be loaded into the database as a blank. 
&lt;BR /&gt;Let me know what you think I should do to resolve the null pointer. 
&lt;BR /&gt; 
&lt;IMG src="https://community.qlik.com/" /&gt; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Mike</description>
      <pubDate>Tue, 05 Jun 2012 18:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234084#M23569</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-06-05T18:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234085#M23570</link>
      <description>Mike,
&lt;BR /&gt;If you click the code window tab (bottom left of the Job design window), you can go to line 3461 and see what field is actually causing the error. If the line shown doesn't make sense, check the other line numbers referenced in the error.
&lt;BR /&gt;I can't see your entire tMap, but the Long.valueOf(row1.CardNumber) seems like a likely candidate. If CardNumber is null, Long.valueOf will throw an NPE.
&lt;BR /&gt;You could also look for places where you are using row1someField.equals("ABC"). It is safer to use "ABC".equals(row1.someField) because in this case, "ABC" is a fixed value that will never be null.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Ben</description>
      <pubDate>Tue, 05 Jun 2012 18:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234085#M23570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T18:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234086#M23571</link>
      <description>Hi, 
&lt;BR /&gt;thanks for the suggestion. It appears that it is taking offense this code block:
&lt;BR /&gt;Var.Points = (java.lang.Math.round(row1.TransactionAmount))* row1.Multiplier;
&lt;BR /&gt;The actual line of code that is throwing it appears to be the rounding step. Do I just have to write some code to check if that input is null before performing the operation?
&lt;BR /&gt;- Mike</description>
      <pubDate>Tue, 05 Jun 2012 18:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234086#M23571</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-06-05T18:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234087#M23572</link>
      <description>You know, I think the problem is that occasionally there is no value in the multiplier field. So it tries to multiply by that and throws the null pointer. 
&lt;BR /&gt;How would I go about inserting code to check whether or not the multiplier value is null/empty? 
&lt;BR /&gt;I know it should be something like 
&lt;BR /&gt;if row1.Multiplier == null 
&lt;BR /&gt; (do rounding without multiplying) 
&lt;BR /&gt;else 
&lt;BR /&gt; (do rounding and multiplying) 
&lt;BR /&gt;but I don't know where to actually put this logic in with the program. Can I do this sort of if/else statement in the expression editor? 
&lt;BR /&gt;- Mike</description>
      <pubDate>Tue, 05 Jun 2012 19:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234087#M23572</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-06-05T19:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with NullPointerException during job run</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234088#M23573</link>
      <description>More than likely, the problem is a null TransactionAmount, not the Multiplier. 
&lt;BR /&gt;(java.lang.Math.round(row1.TransactionAmount))* row1.Multiplier; 
&lt;BR /&gt;The if format for a Talend expression is 
&lt;BR /&gt;(condition)?val_if_true:val_if_false 
&lt;BR /&gt;example 
&lt;BR /&gt;null == row1.TransactionAmount? null : (java.lang.Math.round(row1.TransactionAmount))* row1.Multiplier</description>
      <pubDate>Tue, 05 Jun 2012 19:41:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-NullPointerException-during-job-run/m-p/2234088#M23573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T19:41:50Z</dc:date>
    </item>
  </channel>
</rss>

