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

XML space import failed caused by ConstraintViolationException when using Oracle

XMLWordPrintable

      What Happens
      When importing XML space from the same Confluence Version, the import process failed with the following error displayed:

      com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLIntegrityConstraintViolationException: ORA-00001: violation de contrainte unique (CONFLUENCEADM_ADM.CP_UNIQUE_USER_GROUPS)
      

      Caused
      When SQL logging is enabled, we are able to see that the problem happens in the process of updating content_perm table:

      2014-12-22 18:05:29,858 DEBUG [Long running task: Importing data] [net.sf.hibernate.SQL] log insert into CONTENT_PERM (CP_TYPE, USERNAME, GROUPNAME, CPS_ID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.StringType] nullSafeSet binding 'View' to parameter: 1
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.StringType] nullSafeSet binding null to parameter: 3
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.LongType] nullSafeSet binding '688151' to parameter: 4
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.TimestampType] nullSafeSet binding '2014-11-14 16:25:06' to parameter: 6
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.TimestampType] nullSafeSet binding '2014-11-14 16:25:06' to parameter: 8
      2014-12-22 18:05:29,858 TRACE [Long running task: Importing data] [sf.hibernate.type.LongType] nullSafeSet binding '819206' to parameter: 9
      2014-12-22 18:05:29,909 ERROR [Long running task: Importing data] [sf.hibernate.util.JDBCExceptionReporter] logExceptions ORA-00001: unique constraint (CONF564.CP_UNIQUE_USER_GROUPS) violated
      

        1. bug.jpg
          bug.jpg
          104 kB
        2. PP2-import-error.log
          21 kB
        3. PSP-import-error.log
          16 kB

              Unassigned Unassigned
              mkhairuliana Monique Khairuliana (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: