Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend folks,
When I write below expression for particular column. I am Facing "NullPointerException".
How to solve this issues. please tell me?
(row8.Sales.equals("o") && row9.Bun.equals("B"))?
"B" : (row8.Sales).equals("o")?
"D" : (row8.Sales.equals("o") && row9.Bun.equals("B"))?
"B": row8.Sales
ERROR:
Exception in component tMap_3 (LM)
java.lang.NullPointerException
at local_project___java.lm_0_1.LM.tFileInputExcel_2Process(LM.java:19165)
at local_project___java.lm_0_1.LM.runJobInTOS(LM.java:21300)
at local_project___java.lm_0_1.LM.main(LM.java:21126)
[FATAL]: local_project___java.lm_0_1.LM - tMap_3 null
add check null
(row8.Sales!=null&&row9.Bun!=null)&&(row8.Sales.equals("o") && row9.Bun.equals("B"))?
You need add check null for all important columns
for example - first check - if any of columns null - than null
other variant - define default value for replace null
add check null
(row8.Sales!=null&&row9.Bun!=null)&&(row8.Sales.equals("o") && row9.Bun.equals("B"))?
You need add check null for all important columns
for example - first check - if any of columns null - than null
other variant - define default value for replace null
Thank you @vapukov
Hello,
I am experiencing a similar issue when using the sql editor. Do you mind giving more specific details on what you mean by "other variant - define default value for replace null"?
Thanks so much!
Dear team,
I have the problem of NullPointerException Error but cause is little different. Please help me on the case.
Let say, I got csv file from other team with 10 columns, comma separated value. But one row has only 3 column's value.
While I load data in tmap, i got the error even though I put isempty or null function in tmap. Please see the image for detail and I saw no comma in one row, when error is start happening.
Hello @kyawzin
Do your your input columns have null value? Could you please show us your tMap setting screenshot on community?
Best regards
Sabrina
Yes of course @xdshi , please see the picture in the attachment.
I have noticed one thing but no idea. You can see in my previous picture, there is no comma in the middle row. Actually there must be comma even though there is no value for the rest of the columns. The error is start happening before that row.
@xdshi you can see my output result, some of the row are imported but start from the row which has only two value for 6 columns without comma for the rest column. Example see the line 711400.
@xdshi , hi any comment?