legacy-knowledge-base
Publicado Jul. 25, 2002

Constraint (IX_228562AD) violated when LDAP import on startup is on

written-by

Zalán Szakolci

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • I get Unique constraint (IX_228562AD) violated on Server restart when LDAP's Import on startup is turned on.

Environment

  • Liferay DXP 7.2

Resolution

  • Eliminate LDAP's Import on startup property in Control Panel -> Configuration -> System settings -> LDAP -> Import

Additional Information

  • This error message can safely be ignored
    What happens is that LDAP Import and Import on Startup are turned on at the same time. The base LDAP Importer that runs when LDAP is enabled at all already gets called on startup meaning that the additional feature of calling Import on Startup is redundant. 

  • The error is just due to there being two different threads trying to do the same thing at the same time. While one gets locked out, causing the error, the other thread still executes and seeing as they were both trying to perform an identical operation (import LDAP users), the action gets performed and the LDAP users are imported. The race condition isn't causing any real problems here. 

  • To overcome this, it is reasonable to remove Import on Startup. 
did-this-article-resolve-your-issue

legacy-knowledge-base