nullPointerException in tXMLMap where loop element missing in input
Hi! I'm getting a null pointer exception in tXMLMap which I think is because the Loop-optional element in the inbound XML is not present for a record, but I join to data within the missing element. For example I have <parent> <child> <loopElement> <key> where <key> links to a lookup schema. The process fails when I get a record where the <parent> and <child> exist, but not the <loopElement>. The line of code is identified as generating the exception is row3HashKey.LookupKey = treeNodeAPI_tXMLMap_1_TXMLMAP_OUT .get_Long("row2.docuemnt:/parent/child/loopElement/key"); Any help or suggestions would be gratefully received.
The problem is the situation: reading a nullable column and writing into a not nullable column. This causes the so called unboxing in Java. It means it automatically generates code like this: treeNodeAPI_tXMLMap_1_TXMLMAP_OUT
.get_Long("row2.docuemnt:/parent/child/loopElement/key").longValue();
The method longValue() causes the NullPointerException of the source is null.
To solve this use a nullable column as output.