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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.1
    • Component/s: None
    • Labels:

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  13 years, 7 weeks, 4 days ago