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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
CReeves1601668814
Contributor
Contributor

tMap null pointer in lookup code

I've got an NPE that I can't seem to get around. In the code it's not complaining about any of the mappings, but it's throwing an NPE in the tHash_Lookup at the end of this block. What seems to happen is that all 300k records go through (judging by the UI) and then the input switches back to 1 record (again judging by the UI). I'm stumped. Has anyone seen this/know how to diagnose it? This is when utilizing an inner join. I'm on JDK 11, but had the same issue on 8.

hasCasePrimitiveKeyWithNull_tMap_1 = false;

row6HashKey.HISTRY_DOC_NR = row1.HISTRY_DOC_NR;

row6HashKey.HISTRY_DOC_ACRN = row1.HISTRY_DOC_ACRN;

row6HashKey.APN_BEG_FIS_YR =

"XX"

;

row6HashKey.hashCodeDirty = true;

tHash_Lookup_row6.lookup(row6HashKey);

2 Replies
pakapi_
Creator
Creator

Hi,

 

are you 100% sur that there is no null values in key columns ? I don't see all your flow, but for now it's my first shot.

 

 

manodwhb
Champion II
Champion II

@Charles Reeves​ , you will get null pointer exception in tMap when your writing expression with out handling null.

 

row1.col.equals("Oragne")?1:0

 

this should be written i below way to avoid null pointer exception by writing below way.

 

("Oragne").equals(row1.col)?1:0

 

 

you need to check out in your tMap expressions to find out which column and apply above way . so that you can avoid null pointer exception.

 

Thanks,

Manohar