Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-4606

Unable to remove a directory from crowd: could not execute statement

      We tried to remove a directory from crowd (Microsoft Active Directory) but it fails with the "could not execute statement" error.

      Logs show:

      2016-02-02 16:20:58,927 http-bio-18095-exec-4 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23503
      2016-02-02 16:20:58,927 http-bio-18095-exec-4 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: update or delete on table "cwd_user" violates foreign key constraint "fk_user_attribute_id_user_id" on table "cwd_user_attribute"
        Detail: Key (id)=(16220293) is still referenced from table "cwd_user_attribute".
      2016-02-02 16:20:58,928 http-bio-18095-exec-4 ERROR [console.action.directory.RemoveDirectory] could not execute statement
      org.hibernate.exception.ConstraintViolationException: could not execute statement
      	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
      	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189)
      	at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:108)
      

            [CWD-4606] Unable to remove a directory from crowd: could not execute statement

            Monique Khairuliana (Inactive) made changes -
            Epic Link Original: CWD-4704 [ 600140 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 - restricted [ 1508432 ] New: JAC Bug Workflow v3 [ 3364737 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 [ 1389330 ] New: Simplified Crowd Development Workflow v2 - restricted [ 1508432 ]
            Patryk made changes -
            Resolution New: Support Request [ 18 ]
            Status Original: Needs Verification [ 10004 ] New: Resolved [ 5 ]

            Patryk added a comment -

            We couldn't reproduce that issue with Crowd 2.9. Could you please verify that you still experience the problem? If you do, please contact support so that we can investigate further.
            Best regards,
            Patryk Petrowski

            Patryk added a comment - We couldn't reproduce that issue with Crowd 2.9. Could you please verify that you still experience the problem? If you do, please contact support so that we can investigate further. Best regards, Patryk Petrowski
            Marcin Kempa made changes -
            Epic Link New: CWD-4704 [ 600140 ]
            Marcin Kempa made changes -
            Status Original: Open [ 1 ] New: Needs Verification [ 10004 ]
            Owen made changes -
            Workflow Original: Crowd Development Workflow v2 [ 1133116 ] New: Simplified Crowd Development Workflow v2 [ 1389330 ]

            I added an updated version of the SQL script that can remove the directory at the database level.

            I advise Atlassian customers to hire someone to run it every every time it happens again (~3-4 months).

            So far it was impossible for me to make Atlassian recognize the bug.

            Sorin Sbarnea (Citrix) added a comment - I added an updated version of the SQL script that can remove the directory at the database level. I advise Atlassian customers to hire someone to run it every every time it happens again (~3-4 months). So far it was impossible for me to make Atlassian recognize the bug.
            Sorin Sbarnea (Citrix) made changes -
            Remote Link New: This issue links to "psql_remove_crowd_directory.sql (Web Link)" [ 154286 ]

              Unassigned Unassigned
              a0ba2216890f William Ing
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: