Crowd Synchronization Fails with Integrity Constraint Violation

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

After making some changes to the Bitbucket Server user directory in Crowd and re-syncing with Crowd via Bitbucket Server, the following exception is reported in the Bitbucket Server logs:

2012-12-29 22:30:08,664 WARN  [scheduler_Worker-6]  o.h.e.jdbc.spi.SqlExceptionHelper SQL Error: -104, SQLState: 23505
2012-12-29 22:30:08,664 ERROR [scheduler_Worker-6]  o.h.e.jdbc.spi.SqlExceptionHelper integrity constraint violation: unique constraint or index violation: SYS_IDX_SYS_CT_10168_10170
2012-12-29 22:30:08,666 ERROR [scheduler_Worker-6]  o.h.e.j.batch.internal.BatchingBatch HHH000315: Exception executing batch [integrity constraint violation: unique constraint or index violation: SYS_IDX_SYS_CT_10168_10170]
2012-12-29 22:30:08,678 ERROR [scheduler_Worker-6]  c.a.c.d.DbCachingDirectoryPoller Error occurred while refreshing the cache for directory [ <Directory ID> ].
org.springframework.dao.DataIntegrityViolationException: integrity constraint violation: unique constraint or index violation: SYS_IDX_SYS_CT_10168_10170; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: integrity constraint violation: unique constraint or index violation: SYS_IDX_SYS_CT_10168_10170

Cause

The Bitbucket Server user directory cache could not be refreshed after having changed the user and group configuration within it.

Resolution

There are two possible resolutions:

  1. Restart Bitbucket Server as it will flush out the directory cache in Bitbucket Server.
  2. Delete the existing user directory and re-create it in order to re-sync it.

 

Last modified on Mar 23, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.