Problem
When attempting to generate or save a Final Travel Document, users encounter an error: ‘Attempt to de-reference a null object - Class.KT_NeedToKnowSummaryController.getBody’. The error may appear when saving the document or when viewing it. The issue typically affects only specific itineraries while others generate successfully.
What We Found
The error occurs when one or more services in the itinerary are linked to a location that is not properly configured as an actual destination in the system. The NeedToKnow controller attempts to retrieve documentation for the location, but since the location lacks the required destination/documentation configuration, a null reference error is thrown.
Solution
- Identify the affected itinerary and review all services on the booking
- For each service, check the linked Location field
- Verify that each location is a valid destination record with proper documentation configured
- If a service is linked to an invalid or placeholder location, update it to link to a correct destination
- After correcting the location linkages, regenerate the Final Travel Document
- Test by cloning the booking if needed to verify the fix before updating the live booking
Notes
- The error message references ‘NeedToKnow’ because the Final Travel Document template pulls Need To Know content from destination records
- This issue persists when cloning an affected booking, as the invalid location linkage is copied
- Only itineraries with the specific invalid location configuration will be affected
Warnings
⚠️ Always verify the correct destination before updating location linkages on confirmed bookings ⚠️ If unsure which location is causing the issue, review locations for each service one by one
Source: KHELP-9494