🧪 Experimental KB — Official knowledge hub: community.kaptio.com

Final Travel Document Error: Null Reference in NeedToKnow Controller

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

final_travel_docs null_reference location service_configuration document_generation

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

  1. Identify the affected itinerary and review all services on the booking
  2. For each service, check the linked Location field
  3. Verify that each location is a valid destination record with proper documentation configured
  4. If a service is linked to an invalid or placeholder location, update it to link to a correct destination
  5. After correcting the location linkages, regenerate the Final Travel Document
  6. 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

Was this article helpful?