When i login as the default super user (person_id=1), select the "My Profile" link and click the "Save Options" button, for the first time it saves successfully. For all the rest of the times it fails with the error message below:
I think first time succeeds because the gender is an empty string which passes the validator. But then this empty string is set to null by the OpenmrsObjectSaveHandler leading to the subsequent failures.
Editing the person object for this default super user and setting their gender resolves this problem.