The logon process checks for the locale of the user but the condition where locale is not found in the database, has not been taken care of. A generic solution has been provided keeping in mind of the scenario where the Locale entry does not exist in the database.