Buggy code:
@ Controller @ RequestMapping ( GDEViewNameConstants . INTERNAL ) public class UserManagementController extends AbstractBaseController { @ Autowired private FeaturePermissionService featurePermissionService ; @ Autowired private RoleService roleService ; @ Autowired private UserRoleService userRoleService ; @ Autowired private CreateUserValidator createUserValidator ; @ RequestMapping ( USER_MANAGEMENT_VIEW_WITH_SLASH ) public final ModelAndView saveUserManagementInfo ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Model model , @ ModelAttribute ( USER_MANAGEMENT_FORM ) <START_BUG> final UserManagementDto userManagementDtoObj , final BindingResult result , final Locale locale ) throws UserException { <END_BUG> String homeView = USER_MANAGEMENT_VIEW ; GdeUser loggedUser = GDESessionFacade . getUser ( httpServletRequest ) ; locale = GDESessionFacade . getUserLocale ( httpServletRequest ) ; model . addAttribute ( TAB_LIST , featurePermissionService . getAllFeaturePermissionsByRole ( userRoleService . fetchUserRoleEnumList ( loggedUser ) ) ) ; model . addAttribute ( SELECTED_TAB , USER_MANAGEMENT ) ; model . addAttribute ( "onDeleteMessage" , getMessageSource ( ) . getMessage ( "on.delete.message" , null , locale ) ) ; model . addAttribute ( "cancelMessage" , getMessageSource ( ) . getMessage ( "userManagement.on.cancel.message" , null , locale ) ) ; if ( ( loggedUser . getLastLoginRole ( ) ) == ( RoleEnum . ADMINISTRATOR ) ) { model . addAttribute ( "pageTitle" , getMessageSource ( ) . getMessage ( "role.administrator" , null , locale ) ) ; } else if ( ( loggedUser . getLastLoginRole ( ) ) == ( RoleEnum . SUPERVISOR ) ) { model . addAttribute ( "pageTitle" , getMessageSource ( ) . getMessage ( "supervisor" , null , locale ) ) ; } else if ( ( loggedUser . getLastLoginRole ( ) ) == ( RoleEnum . SUPPORT ) ) { model . addAttribute ( "pageTitle" , getMessageSource ( ) . getMessage ( "role.support" , null , locale ) ) ; } if ( ( CREATE_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) || ( EDIT_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) ) { homeView = CREATE_USER_VIEW ; UserManagementDto userManagementDto = getUserService ( ) . getUserManagementDto ( userManagementDtoObj . getObjId ( ) ) ; model . addAttribute ( "UserManagementForm" , userManagementDto ) ; List < CategoryEnum > categoryList = new ArrayList < CategoryEnum > ( ) ; categoryList . add ( EVALUATOR ) ; categoryList . add ( INTERNAL ) ; model . addAttribute ( "userRolesDropDown" , roleService . getRolesMapByCategory ( categoryList , locale ) ) ; model . addAttribute ( ON_CANCEL_MESSAGE , getMessageSource ( ) . getMessage ( "on.cancel.message" , null , locale ) ) ; return new ModelAndView ( homeView ) ; } else if ( ( ADD_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) || ( UPDATE_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) ) { createUserValidator . validate ( userManagementDtoObj , result ) ; if ( result . hasErrors ( ) ) { List < CategoryEnum > categoryList = new ArrayList < CategoryEnum > ( ) ; categoryList . add ( EVALUATOR ) ; categoryList . add ( INTERNAL ) ; model . addAttribute ( "userRolesDropDown" , roleService . getRolesMapByCategory ( categoryList , locale ) ) ; return new ModelAndView ( CREATE_USER_VIEW ) ; } if ( ADD_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) { MailMetaData mailMetaData = null ; GdeUser user = null ; user = getUserService ( ) . findAuthenticationUser ( userManagementDtoObj . getEmail ( ) . trim ( ) , null ) ; userManagementDtoObj . setPassword ( GDEStringUtils . generateRandomPassword ( ) ) ; mailMetaData = getMailMetaDataForStaffRegistrationMail ( userManagementDtoObj , locale , getApplicationPath ( httpServletRequest ) ) ; if ( user == null ) { getUserService ( ) . createUser ( userManagementDtoObj , mailMetaData ) ; homeView = USER_MANAGEMENT_VIEW ; } else { model . addAttribute ( CSS_CLASS , "alert-danger" ) ; model . addAttribute ( MESSAGE , getMessageSource ( ) . getMessage ( "userManagement.error.message" , null , locale ) ) ; } } else { getUserService ( ) . updateUser ( userManagementDtoObj ) ; homeView = USER_MANAGEMENT_VIEW ; } } else if ( DELETE_USER_ENTRY . equals ( userManagementDtoObj . getActionType ( ) ) ) { getUserService ( ) . deleteUser ( userManagementDtoObj . getObjId ( ) ) ; } if ( ( userManagementDtoObj . getCurrentPage ( ) ) == null ) { userManagementDtoObj . setCurrentPage ( DEFAULT_CURRENT_PAGE ) ; } if ( ( userManagementDtoObj . getNoOfRecords ( ) ) == null ) { userManagementDtoObj . setNoOfRecords ( DEFAULT_NO_OF_RECORDS_USER_MGMT ) ; } if ( StringUtils . isEmpty ( userManagementDtoObj . getSortParameter ( ) ) ) { userManagementDtoObj . setSortParameter ( DEFAULT_SORT_PARAM_USER_MGMT ) ; } if ( ( userManagementDtoObj . getIsAscending ( ) ) == null ) { userManagementDtoObj . setIsAscending ( false ) ; } PaginationDataDTO paginationDataDTO = new PaginationDataDTO ( userManagementDtoObj ) ; ArrayList < UserManagementDto > objUserManagementDtoList = ( ( ArrayList < UserManagementDto > ) ( getUserService ( ) . getStaffUserList ( paginationDataDTO ) ) ) ; Integer noOfPages = getNoOfPages ( paginationDataDTO . getAllRecordsCount ( ) , userManagementDtoObj . getNoOfRecords ( ) ) ; UiPaginationDto paginationDto = new UiPaginationDto ( userManagementDtoObj . getCurrentPage ( ) , noOfPages , USER_MANAGEMENT_VIEW ) ; model . addAttribute ( TOTAL_USER_MGMT_COUNT , paginationDataDTO . getAllRecordsCount ( ) ) ; model . addAttribute ( PAGINATION_DTO_USER_MGMT , paginationDto ) ; model . addAttribute ( "objUserManagementDtoList" , objUserManagementDtoList ) ; model . addAttribute ( USER_MANAGEMENT_FORM , userManagementDtoObj ) ; model . addAttribute ( ON_CANCEL_MESSAGE , getMessageSource ( ) . getMessage ( "on.cancel.message" , null , locale ) ) ; model . addAttribute ( "pagingTitle" , getBaseService ( ) . getPagingTitle ( userManagementDtoObj . getCurrentPage ( ) , userManagementDtoObj . getNoOfRecords ( ) , paginationDataDTO . getAllRecordsCount ( ) ) ) ; return new ModelAndView ( homeView ) ; } private MailMetaData getMailMetaDataForStaffRegistrationMail ( final UserManagementDto registrationDtoObj , final Locale locale , final String contextpath ) { } }

Fix:
final UserManagementDto userManagementDtoObj , final BindingResult result , Locale locale ) throws UserException {