Buggy code:
@ Controller public class RegistrationController extends AbstractBaseController { @ Autowired private MarketingDataService marketingDataService ; @ Autowired private CountryService countryService ; @ Autowired private UserRegistrationInformationService userRegistrationInformationService ; @ Autowired private RegistrationValidator registrationValidator ; @ RequestMapping ( "//registration" ) public ModelAndView registration ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Map < String , Object > model , @ ModelAttribute ( "registrationForm" ) final RegistrationDto registrationDtoObj , final BindingResult result , final Locale locale ) { String pageKey = "registration.page.title" ; String viewName = REGISTRATION_VIEW ; model . put ( "salutationsDropDown" , getBaseService ( ) . getSalutationsMap ( locale ) ) ; model . put ( "certificationReceivedDropDown" , getBaseService ( ) . getDecisionMap ( locale ) ) ; model . put ( "maritalStatusDropDown" , getBaseService ( ) . getMaritalStatusMap ( locale ) ) ; model . put ( "phoneTypeDropDown" , getBaseService ( ) . getPhoneTypeMap ( locale ) ) ; model . put ( "noOfChildrenDropDown" , getBaseService ( ) . getNoOfChildrenMap ( locale ) ) ; model . put ( "marketingDataDropDown" , marketingDataService . getMarketingDataMap ( locale ) ) ; model . put ( "countryDropDown" , countryService . getCountryMap ( locale ) ) ; model . put ( "certificateTypeDropDown" , getBaseService ( ) . getCertificationTypeMap ( locale ) ) ; model . put ( "internaturLabel" , getMessageSource ( ) . getMessage ( "registration.valid.internatur.certificate" , null , locale ) ) ; model . put ( "ordinaturLabel" , getMessageSource ( ) . getMessage ( "registration.valid.ordinatur.certificate" , null , locale ) ) ; GdeUser user = GDESessionFacade . getUser ( httpServletRequest ) ; if ( null == ( registrationDtoObj . getPersonalInformationDto ( ) ) ) { RegistrationDto registrationDto = userRegistrationInformationService . getRegistrationDto ( user . getId ( ) ) ; model . put ( "registrationForm" , registrationDto ) ; model . put ( "onCancelMessage" , getMessageSource ( ) . getMessage ( "on.cancel.message" , null , locale ) ) ; model . put ( "pageTitle" , getMessageSource ( ) . getMessage ( pageKey , null , locale ) ) ; model . put ( "compareDateErrMsg" , getMessageSource ( ) . getMessage ( "registration.compareDateErrMsg" , null , locale ) ) ; model . put ( "expectedCertificateMsg" , getMessageSource ( ) . getMessage ( "registration.expectedCertificateMsg" , null , locale ) ) ; } else { UserRegistrationInformation userRegistrationInfo = new UserRegistrationInformation ( ) ; userRegistrationInformationService . setRegistrationDocDto ( registrationDtoObj , registrationDtoObj . getRegistrationInfoId ( ) , getBaseService ( ) . getEntityClass ( userRegistrationInfo ) ) ; registrationDtoObj . getPersonalInformationDto ( ) . getPassportDto ( ) . setUserId ( user . getId ( ) ) ; registrationDtoObj . getPersonalInformationDto ( ) . getPassportDto ( ) . setDocCategory ( INTERNAL_PASSPORT ) ; registrationDtoObj . getProfessionalDataDto ( ) . getMedicalDiplomaDto ( ) . setUserId ( user . getId ( ) ) ; <START_BUG> registrationDtoObj . getProfessionalDataDto ( ) . getMedicalDiplomaDto ( ) . setDocCategory ( DIPLOMA ) ; <END_BUG> if ( ( registrationDtoObj . getProfessionalDataDto ( ) . getCertificationReceived ( ) ) == ( DecisionEnum . YES ) ) { registrationDtoObj . getProfessionalDataDto ( ) . getSpecialCertificateDto ( ) . setUserId ( user . getId ( ) ) ; if ( ( registrationDtoObj . getProfessionalDataDto ( ) . getCertificateType ( ) ) == ( CertificationTypeEnum . INTERNATUR ) ) { registrationDtoObj . getProfessionalDataDto ( ) . getSpecialCertificateDto ( ) . setDocCategory ( INTERNATUR ) ; } else if ( ( registrationDtoObj . getProfessionalDataDto ( ) . getCertificateType ( ) ) == ( CertificationTypeEnum . ORDINATUR ) ) { registrationDtoObj . getProfessionalDataDto ( ) . getSpecialCertificateDto ( ) . setDocCategory ( ORDINATUR ) ; } } registrationValidator . validate ( registrationDtoObj , result ) ; if ( result . hasErrors ( ) ) { model . put ( "onCancelMessage" , getMessageSource ( ) . getMessage ( "on.cancel.message" , null , locale ) ) ; model . put ( "pageTitle" , getMessageSource ( ) . getMessage ( pageKey , null , locale ) ) ; model . put ( "compareDateErrMsg" , getMessageSource ( ) . getMessage ( "registration.compareDateErrMsg" , null , locale ) ) ; model . put ( "expectedCertificateMsg" , getMessageSource ( ) . getMessage ( "registration.expectedCertificateMsg" , null , locale ) ) ; if ( ( result . getFieldError ( "actionType" ) ) != null ) { model . put ( "errorMessage" , getMessageSource ( ) . getMessage ( "allrequiredfields" , null , locale ) ) ; model . put ( "requiredErrMsg" , getMessageSource ( ) . getMessage ( "registration.requiredErrMsg" , null , locale ) ) ; } return new ModelAndView ( viewName ) ; } if ( "submitApplication" . equals ( registrationDtoObj . getActionType ( ) ) ) { userRegistrationInfo = userRegistrationInformationService . submitUserRegistration ( registrationDtoObj , user ) ; registrationDtoObj . setRegistrationInfoId ( userRegistrationInfo . getId ( ) ) ; viewName = REGISTRATION_SUCCESS_VIEW ; } else { model . put ( "onCancelMessage" , getMessageSource ( ) . getMessage ( "on.cancel.message" , null , locale ) ) ; model . put ( "pageTitle" , getMessageSource ( ) . getMessage ( pageKey , null , locale ) ) ; model . put ( "compareDateErrMsg" , getMessageSource ( ) . getMessage ( "registration.compareDateErrMsg" , null , locale ) ) ; model . put ( "expectedCertificateMsg" , getMessageSource ( ) . getMessage ( "registration.expectedCertificateMsg" , null , locale ) ) ; model . put ( "confirmationMessage" , getMessageSource ( ) . getMessage ( "registration.submit.data.confirmation.message" , null , locale ) ) ; userRegistrationInfo = userRegistrationInformationService . saveUserRegistration ( registrationDtoObj , user ) ; registrationDtoObj . setRegistrationInfoId ( userRegistrationInfo . getId ( ) ) ; } } return new ModelAndView ( viewName ) ; } }

Fix:
registrationDtoObj . getProfessionalDataDto ( ) . getMedicalDiplomaDto ( ) . setDocCategory ( DEFAULT_MEDICAL_DIPLOMA ) ;