- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
LookupRecord Processor Throws Null Pointer Exception While the Corresponding Field Does Not Have Null
- Labels:
-
Apache NiFi
Created on 03-06-2024 12:10 AM - edited 03-06-2024 12:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
LookupService Configuration:
Error:
