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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

NullPointerException error with Nullable field

Hello,
I am faced with a 'java.lang.NullPointerException' when I set a null value in a (nullable) field. 
The error is just at the t_map, I am not yet inserting in a database.
Here is the transformation I am doing

Relational.ISNULL(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU)) ? null :
"Tim".equalsIgnoreCase(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU))? 1 :
"Sup".equalsIgnoreCase(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU))? 0 : null


When I replace null by 999 there is no error

Relational.ISNULL(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU)) ? 999 :
"Tim".equalsIgnoreCase(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU))? 1 :
"Sup".equalsIgnoreCase(StringHandling.TRIM(Stie_adresse.CANDIDAT_STATU))? 0 : 999


I don't understand why I am getting the error since my fields are nullabe.

Any help please? Thank you




0683p000009MFWO.png

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Have you looked at the line that is throwing the exception in the Code view, to see exactly what is causing the exception?
As you suggest, everything here seems ok