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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Sudhee_Maximus
Creator
Creator

Null pointer exception while using Fixed width file.

Hello there ,

I am facing this issue with one of the Fixed width file while loading to target MY SQL where it gives null pointer exception.

 

even though I am handling it by using multiple ways not able to find the issue... can someone help me in this ?

I tried using .... StringHandling.LEN(row.P_LANG_CD1)==0 ? "anpdifddjl****" : row.P_LANG_CD1

 

(
row2.P_LANG_CD1.equals(null) &&
row2.P_LANG_CD2.equals(null) &&
row2.P_LANG_CD3.equals(null) &&
row2.P_LANG_CD4.equals(null) &&
row2.P_LANG_CD5.equals(null) &&
row2.P_LANG_CD6.equals(null) &&
row2.P_LANG_CD7.equals(null)
)
? null :
(
(Lang1.value.equals(null) && (row2.P_LANG_CD1 != null || row2.P_LANG_CD1 != "")) ||
(Lang2.value.equals(null) && (row2.P_LANG_CD2 != null || row2.P_LANG_CD2 != "")) ||
(Lang3.value.equals(null) && (row2.P_LANG_CD3 != null || row2.P_LANG_CD3 != "")) ||
(Lang4.value.equals(null) && (row2.P_LANG_CD4 != null || row2.P_LANG_CD4 != "")) ||
(Lang5.value.equals(null) && (row2.P_LANG_CD5 != null || row2.P_LANG_CD5 != "")) ||
(Lang6.value.equals(null) && (row2.P_LANG_CD6 != null || row2.P_LANG_CD6 != "")) ||
(Lang7.value.equals(null) && (row2.P_LANG_CD7 != null || row2.P_LANG_CD7 != ""))
) ? "Language code not found": null

 

To Identify the  value which is troubling me I tried different ways as shown above and attacehd , but the value shows empty instead ... not sure how to resolve this issue.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

@SudheeReddy 

 

Thanks for the update. Could you please mark the topic as resolved?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

View solution in original post

4 Replies
Sudhee_Maximus
Creator
Creator
Author

looks like i got a solution ... Thanks
Anonymous
Not applicable

Hi,

 

   If you are using any Java function, you need to make sure that the incoming data for that column is not null. If you anticipate that any column may have null value also, you need to add a null check first before doing other operations.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Sudhee_Maximus
Creator
Creator
Author

hey nikhil,

 

thanks for the reply , I sorted out the issue and its working fine now ...

will reach out to you if any help needed 🙂 

Anonymous
Not applicable

@SudheeReddy 

 

Thanks for the update. Could you please mark the topic as resolved?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved