ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Roadmap error when trying to copy scenario by using “Save As”

book

Article ID: 218568

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Intermittently, unable to copy a scenario. There is an error "problem doPostCreate while copying scenario" in Roadmaps when trying to copy scenario using “Save As”

Error in logs:

ERROR 2021-06-29 12:23:36,770 [http-nio-8080-exec-64] rest.validation (clarity:admin:...:PPM_REST_API) ODFResourceProvider :: Could not create resource. Object code alias: [ requestUrl: http://<Clarityserver>/ppm/rest/v1/scenarios , _restResourceName : scenarios , _id : null , _parentInfo : null , _apiVersion : v1 , _includeLinksArray : true , _contextId : -1 , _hierarchyId : -1]

ERROR 2021-06-29 12:23:36,771 [http-nio-8080-exec-64] rest.validation (clarity:admin:.......:PPM_REST_API)

com.niku.union.odf.exception.ODFServiceException: problem doPostCreate while copying scenario

Caused by: com.niku.union.persistence.PersistenceException:

SQL error code: 0

Error message: ERROR: duplicate key value violates unique constraint "odf_item_positions_pk"

  Detail: Key (context_id, picklist_def_id, object_code, instance_id, lookup_id)=(5115337, 5104193, task, 5107571, 3397) already exists.

Executed:

INSERT INTO ODF_ITEM_POSITIONS (CONTEXT_ID,PICKLIST_DEF_ID,OBJECT_CODE,INSTANCE_ID,LOOKUP_ID,POSITION,CREATED_DATE,CREATED_BY, LAST_UPDATED_DATE, LAST_UPDATED_BY)

          SELECT OIP.CONTEXT_ID,OIP.PICKLIST_DEF_ID,OIP.OBJECT_CODE,RRI_TGT.ID,OIP.LOOKUP_ID,OIP.POSITION,?,?,?,? FROM ODF_ITEM_POSITIONS OIP ,RDM_ROADMAP_ITEMS RRI_SRC,RDM_ROADMAP_ITEMS RRI_TGT

          WHERE OIP.INSTANCE_ID = RRI_SRC.ID

          AND RRI_SRC.SCENARIO_ID = ?

          AND RRI_SRC.CODE = RRI_TGT.CODE

          AND RRI_TGT.SCENARIO_ID = ?

Derived from statement:

<?xml version="1.0" encoding="UTF-8"?>

<statement sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="map" xmlns=http://schemas.niku.com/2002/pmd>

  <sql dbVendor="all" tsvTemplateAttrCode="">

    <text>

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "odf_item_positions_pk"

  Detail: Key (context_id, picklist_def_id, object_code, instance_id, lookup_id)=(5115337, 5104193, task, 5107571, 3397) already exists.

Developer tools trace:

From a browser trace, the following error is displayed:

  1. {resourceId: null, httpStatus: "500", errorMessage: "problem doPostCreate while copying scenario",…}
    errorCode"api.internalError"
    errorMessage"problem doPostCreate while copying scenario"
    httpStatus"500"
    resourceIdnull

Environment

Release : 15.9.2

Component : Clarity Roadmaps

Resolution

This fixed in 15.9.3

There is no workaround in place.

 

Additional Information

See also Roadmap known issues - master KB