Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-6092

Cannot create new user due to primary key violation or unique constraint error

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.2.1
    • 2.2
    • None

      Here are the exceptions from various databases:

      Oracle:

      org.springframework.dao.DataIntegrityViolationException: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: ORA-00001: unique constraint (CWK.SYS_C002106) violated
      at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:88)
      caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (CWK.SYS_C002106) violated
      at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)

      MS SQL Server:

      org.springframework.dao.DataIntegrityViolationException: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK_os_user_5070F446'. Cannot insert duplicate key in object 'os_user'.
      at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:88)
      caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK_os_user_5070F446'. Cannot insert duplicate key in object 'os_user'.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)

      MySQL:

      org.springframework.dao.DataIntegrityViolationException: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate entry '1' for key 1
      at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:88)
      caused by: java.sql.BatchUpdateException: Duplicate entry '1' for key 1
      at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)

            [CONFSERVER-6092] Cannot create new user due to primary key violation or unique constraint error

            No work has yet been logged on this issue.

              Unassigned Unassigned
              dave@atlassian.com dave (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: