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

    XMLWordPrintable

Details

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

    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

              Unassigned Unassigned
              dave@atlassian.com dave (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: