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

Weird NullPointerException in tMap

Hi there,

 

I'm getting a NullPointerException when trying to calculate an expression in a tMap that has 2 inputs.

 

Here is the syntax of the expression:

 

Relational.ISNULL(account_transaction.date_entree) || Relational.ISNULL(account_transaction.date_sortie)
	? null
	: TalendDate.diffDate(account_transaction.date_sortie, account_transaction.date_entree, "HH") <= 5
		? 0.0
		: Relational.ISNULL(calcul_taxe_sejour.taxe_sejour)
			? null
			: calcul_taxe_sejour.taxe_sejour 

 

account_transaction is my Main and calcul_taxe_sejour is my Lookup.

 

The error is raised on this line of the expression:

 

		: Relational.ISNULL(calcul_taxe_sejour.taxe_sejour)

 

but everything is correctly written for the Lookup flow and moreover the job compiles:

 

0683p000009M09a.png

 

Also I set up the field as nullable.

 

I don't understand what the problem is. If anyone can suggest a few things I can try to debug that would be awesome.

 

Thx!

Labels (2)
11 Replies
fdenis
Master
Master

if trouble is on output you may cast your result even if null.

(Relational.ISNULL(account_transaction.date_entree) || Relational.ISNULL(account_transaction.date_sortie)
? (Integer)null
: TalendDate.diffDate(account_transaction.date_sortie, account_transaction.date_entree, "HH") <= 5
? 0.0
: Relational.ISNULL(calcul_taxe_sejour.taxe_sejour)
? (Integer)null
: calcul_taxe_sejour.taxe_sejour )
Anonymous
Not applicable
Author

Can you show us your output schema? Either your column is not set to nullable or there is a bug