Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Tmap null pointer exception

Hello,
I'm using Java TOS 2.4.0.RC1.
I'm using a tWaitForFile to start a mixing a xml File and doing a lookup on DB2 AS400 table.
During the first iteration i have no problem all succeed but the second iteration make a nullpointerException in Tmap.

Exception in component tMap_1
java.lang.NullPointerException
at rfid.rfid_0_1.rfid.tWaitForFile_1Process(rfid.java:2051)
at rfid.rfid_0_1.rfid.tAS400Connection_1Process(rfid.java:261)
at rfid.rfid_0_1.rfid.runJobInTOS(rfid.java:3940)
at rfid.rfid_0_1.rfid.main(rfid.java:3852)
It's seem due to lookup component but i' don't understand why.

Thanks for reply

Labels (4)
32 Replies
Anonymous
Not applicable
Author

You mean you get some NullPointerExceptions ?
There are plenty reasons for getting this. One of the most common reason is to have a tMap with an input flow with numeric nullable columns mapped to numeric NONE nullable columns. Because of the automatic unboxing in Java this could fail if the input value is null.
Please provide a bit more information as "Yes I have the same problem" because I guess you will not habe the same job running like in the original post.
Anonymous
Not applicable
Author

@ jlolling thanks for your reply

actually i have a job which picks form a flat file (text file ) and loads into oracle database , when i run the job i normally get these  NullPointerExceptions error   , but if i check the table the record was been loaded successfully .
i am worried that because of these error, the job might fail in the near future 

thanks
Anonymous
Not applicable
Author

@jlolling thanks for your reply

actually i have a job which picks form a flat file (text file ) and loads into oracle database , when i run the job i normally get these  NullPointerExceptions error   , but if i check the table the record was been loaded successfully .
i am worried that because of these error, the job might fail in the near future 

thanks

The job will stop if the 'die on error' option is checked on tMap, otherwise, the job will continue to process next record even thought this error occurs, but not all of the records are loaded into database. Anyway, you are necessary to analyse the error and resolve it before you deploy the job to product environment. 
Best regards
Shong
Anonymous
Not applicable
Author

how can we find at specifically which column and what data inside that is throwing this null pointer exception as i am puzzled and my source has 2 million records and we are populating target by joining  multiple tables. and also how to filter out erroneous data from tmap into any file or any table so that we can modify the data if required
Anonymous
Not applicable
Author

Simply check which input column is nullable and is assigned to a none-nullable output column. These are potential assignments causing a NullPointerException.
Anonymous
Not applicable
Author

Simply check which input column is nullable and is assigned to a none-nullable output column. These are potential assignments causing a NullPointerException.

my all input columns and all output columns are nullable . i have used MD5 to create hash value and used multiple columns to generate this. can this cause to this exception . how to find out the root cause of this exception. like which columns or what data is leading to this so that i can handle that value.
Anonymous
Not applicable
Author

Hi,
I am having a problem where NullPointerException is not thrown when the Primary keys are null.
I have designed these columns as Not Nullable ,even though I am not getting the error and displaying as NULL in my output file.
can anyone help me in resolving this. The below is my tmap and input schema
Anonymous
Not applicable
Author

I simply wasted 2 days on this issue.Also tried jlollings solution.
But in the end I simply downloaded the output in tlogrow and pasted in the notepad.What I saw were some records in the excel file which I was not able to see with naked eyes.Itried the hidin un hiding option still could not see those records.
Finally I copied the output in tlogrow in a notepad ,removed those unwanted records and then loaded the data ,it ran fine!!
Other ETL tools ran this file fine!!!
Dont know what should I call this,curse or a boon 0683p000009MAB6.png
You can refer the same issue I had highlighted here.
https://community.talend.com/t5/Design-and-Development/Error-while-reading-excel-file/td-p/89894
Excel experts may help me find these rows!!!Suggestions welcome.
Anonymous
Not applicable
Author

Could be a rule that's causing it as well. Look at the line number of the code in the stack trace and check against code tab to see where the problem is
Anonymous
Not applicable
Author

Thanks janhess2 how can I enable row number on the code tab ?