Support Questions

Find answers, ask questions, and share your expertise

LookupRecord Processor Throws Null Pointer Exception While the Corresponding Field Does Not Have Null

avatar
Explorer

I'm using a LookupRecord Processor to look up a MySQL table. The incoming Flow File Records is in Avro format have a column 'ID_BB_UNIQUE', which should be mapped to the field named 'ID_BB_Unique' in the MySQL table for lookup. After lookup, I return 'ID_BB_Unique' as 'Lookup_ID_BB_Unique' and insert this field value to the Flow File Records. However, the processor throwed me a java.lang.NullPointerException: null value for (non-nullable) string at nifiRecord.Lookup_ID_BB_Unique, while 'ID_BB_UNIQUE' in Flow File is confirmed to not have nulls, and 'ID_BB_Unique' is set to be not null in database.

What might be causing this exception and how can I solve it?

(If I choose 'Insert Entire Record' as Record Result Contents property in the processor, there is no such exception, but I believe it is not the correct logic to do my lookups and does not solve the problem from root.)

 

LookupRecord Configuration:

iriszhuhao_1-1709712302887.png

LookupService Configuration:

iriszhuhao_2-1709712351710.png

Error:

iriszhuhao_0-1709711993531.png

 

0 REPLIES 0