Crowd Synchronization Fails with Integrity Constraint Violation

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

After making some changes to the Stash user directory in Crowd and re-syncing with Crowd via Stash, the following exception is reported in the Stash 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 Stash 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 Stash as it will flush out the directory cache in Stash.
  2. Delete the existing user directory and re-create it in order to re-sync it.
Last modified on Feb 26, 2016

Was this helpful?

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