2 Replies Latest reply on Feb 2, 2017 2:26 AM by hchiorean

    PrimaryKey violation on restoreRepository() while migrating form 4.6.x to 5.3.x

    timoschaz

      Hello,

      i made a backup from an existing 4.6.x repository using the backupRepository() functionality of modeshape.

      When i want to restore the backup to the new 5.3 repository i get the following exception:

       

      There was unexpected problem during the restore operations: org.h2.jdbc.JdbcBatchUpdateException: Eindeutiger Index oder Primärschlüssel verletzt: "PRIMARY_KEY_4 ON PUBLIC.MODESHAPE_REPOSITORY(ID) VALUES ('xxxx', yyyy)"

      Unique index or primary key violation: "PRIMARY_KEY_4 ON PUBLIC.MODESHAPE_REPOSITORY(ID) VALUES ('xxxx', yyyy)"; SQL statement:

      INSERT INTO MODESHAPE_REPOSITORY (ID, CONTENT) VALUES (?, ?) [23505-191]

       

      When the backup is on the same version backup and restore has no problems.