Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-23849

XML backup restore fails with unique index error if db collate is change from a case sensitive one to a insensitive one

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • 4.3
    • None

    Description

      If an XML backup from a case sensitive collate is used to restored data in case insensitive collate, the process fails with the following error:

      2011-03-04 09:14:46,710 http-8080-1 ERROR anonymous 554x40x1 1rdh6sz 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [jira.action.admin.DataImport] Error importing data: 
      org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: 
      [GenericEntity:UserHistoryItem][id,11887][username,showlett][entityId,10613][lastViewed,1286786159742][type,Issue] (SQL Exception while executing the following:INSERT 
      INTO userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Duplicate entry 'Issue-showlett-10613' for key 
      'uh_type_user_entity'))
      org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: 
      [GenericEntity:UserHistoryItem][id,11887][username,showlett][entityId,10613][lastViewed,1286786159742][type,Issue] (SQL Exception while executing the following:INSERT 
      INTO userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Duplicate entry 'Issue-showlett-10613' for key 'uh_type_user_entity'))
      	at com.atlassian.jira.action.admin.OfbizImportHandler.startElement(OfbizImportHandler.java:122)
      	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      ...
      Caused by: org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while 
      inserting: [GenericEntity:UserHistoryItem][id,11887][username,showlett][entityId,10613][lastViewed,1286786159742][type,Issue] (SQL Exception while executing the 
      following:INSERT INTO userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Duplicate entry 'Issue-showlett-10613' for key 
      'uh_type_user_entity'))
      	... 151 more
      Caused by: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,11887]
      [username,showlett][entityId,10613][lastViewed,1286786159742][type,Issue] (SQL Exception while executing the following:INSERT INTO userhistoryitem (ID, entitytype, 
      entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Duplicate entry 'Issue-showlett-10613' for key 'uh_type_user_entity'))
      	at com.atlassian.jira.action.admin.OfbizImportHandler$1.run(OfbizImportHandler.java:482)
      	at com.atlassian.jira.util.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:43)
      	at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
      	at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	... 1 more
      Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,11887][username,showlett][entityId,10613]
      [lastViewed,1286786159742][type,Issue] (SQL Exception while executing the following:INSERT INTO userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) 
      VALUES (?, ?, ?, ?, ?, ?) (Duplicate entry 'Issue-showlett-10613' for key 'uh_type_user_entity'))
      	at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156)
      	at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121)
      	at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63)
      	at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489)
      	at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469)
      	at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77)
      	at com.atlassian.jira.action.admin.OfbizImportHandler$1.run(OfbizImportHandler.java:471)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bdziedzic Bogdan Dziedzic [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: