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: 
MattE
Creator II
Creator II

tMap null pointer exception

I'm getting this in a tMap with dozens of rows so it's not easy to quickly debug even though I've wrapped every row in a null check.

Is there no way to get the name of the field which is actually causing the error?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Funny, this was a request from me about 6 years ago when we discuss possible improvements for the tMap with the product management - nothing happens!

Sorry to say, no there is no easy way. The only chance you have is to run the job in the studio and if the Exception happens here the code line in the stacktrace is correct and you can see where it happens.

General speaking: Check all parts where a nullable number typed incoming field is mapped to an output field which is not nullable. Check if you use expressions with methods on fields or variables. Please check also joins, the comparison of field content is often a call to a equals method internally and this can cause NullPointerExceptions.

View solution in original post

3 Replies
Anonymous
Not applicable

Funny, this was a request from me about 6 years ago when we discuss possible improvements for the tMap with the product management - nothing happens!

Sorry to say, no there is no easy way. The only chance you have is to run the job in the studio and if the Exception happens here the code line in the stacktrace is correct and you can see where it happens.

General speaking: Check all parts where a nullable number typed incoming field is mapped to an output field which is not nullable. Check if you use expressions with methods on fields or variables. Please check also joins, the comparison of field content is often a call to a equals method internally and this can cause NullPointerExceptions.

Anonymous
Not applicable

If you like you can post here the stack trace and also the code lines around the line mentioned in the stack trace. We could analyse this and tell you what went wrong.

MattE
Creator II
Creator II
Author

Many thanks @Jan Lolling​ , i'd had such inconsistent results with the line numbers before that I've stopped relying on them. With your help I was able to track it down to a typo on 2 very similarly named columns where one was being used in the other but was in fact null