Update getErrorCategoryIdByName to use hibernate.