NOTE: This article is an INTERNAL article and is not visible to customers, currently. Please only link this article in internal comments, but not public comments.
Issue
- There are recurrent
UserEmailAddressException$MustNotBeDuplicate
errors in the logs when syncing between Liferay and an LDAP server. - In each sync iteration, in the log are registered errors like this:
com.liferay.portal.kernel.exception.UserEmailAddressException$MustNotBeDuplicate: User XXXXXX cannot be created because a user with company YYYYYYYYYY@domain.com and email address XXXXXX is already in use
- The errors show the problematic users and their email addresses.
Environment
- Liferay DXP 7.0+
Resolution
- The values of attributes ScreenName and EmailAddress must be unique in the Liferay instance.
- In the sync LDAP process:
- When a new user is detected in a sync iteration, the user will be imported to Liferay from LDAP.
- At this moment, the user attributes will be validated.
- This validation process checks that the ScreenName and Email of the new user are no present in any other existing user. If this happens, a MustNotBeDuplicate exception will be thrown.
- This is one of the main error causes when importing users.
- If you have this kind of fail, you will have to review the problematic users' attributes and resolve these attribute conflicts to be able to import them.