Merging multiple versions can lead duplicate key errors from the database

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 6.0.3
    • Affects Version/s: 6.0, 6.1
    • Component/s: None
    • 6

      1. Restore TestVersionMerge.xml from JIRA source.
      2. Goto the versions page for project HSP.
      3. (BUG) Merge version2 and version3 into version1. You may get a server error in the dialog. It happens on my box 50% of the time when connected to PostgreSQL. On the server the log will be something like:
        Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:NodeAssociation][sinkNodeId,10111][associationType,IssueFixVersion][sourceNodeId,10103][sourceNodeEntity,Issue][sinkNodeEntity,Version] (SQL Exception while executing the following:INSERT INTO public.nodeassociation (SOURCE_NODE_ID, SOURCE_NODE_ENTITY, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE) VALUES (?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_nodeassociation"
          Detail: Key (source_node_id, source_node_entity, sink_node_id, sink_node_entity, association_type)=(10103, Issue, 10111, Version, IssueFixVersion) already exists.))
        	at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:149)
        	at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:114)qq
        
      4. Repeat until error occurs.

            Assignee:
            Oswaldo Hernandez (Inactive)
            Reporter:
            bain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: