agl addin fails: duplicate key value violates unique constraint "odf_subviews_pk"

book

Article ID: 225103

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

The agl addin install fails with error below:

8/16/21, 10:31 PM (admin) ERROR 16-08 22:31:14,608 - Database Error thrown
8/16/21, 10:31 PM (admin) com.niku.union.persistence.PersistenceException:
8/16/21, 10:31 PM (admin) SQL error code: 0
8/16/21, 10:31 PM (admin) Error message: ERROR: duplicate key value violates unique constraint "odf_subviews_pk"
8/16/21, 10:31 PM (admin)   Detail: Key (id)=(5153154) already exists.
8/16/21, 10:31 PM (admin) Executed:
8/16/21, 10:31 PM (admin)  insert into odf_subviews
8/16/21, 10:31 PM (admin)                     ( id, parent_view_id, child_view_id,
8/16/21, 10:31 PM (admin)                       created_date, created_by, last_updated_date, last_updated_by )
8/16/21, 10:31 PM (admin)           select ?, ?, v.id, ?, ?, ?, ?
8/16/21, 10:31 PM (admin)           from   odf_views v
8/16/21, 10:31 PM (admin)           where  v.code = ?
8/16/21, 10:31 PM (admin)           and    v.partition_code = ?
8/16/21, 10:31 PM (admin)           and    v.object_code = ?
8/16/21, 10:31 PM (admin)           and    not exists(
8/16/21, 10:31 PM (admin)                    select sv.id
8/16/21, 10:31 PM (admin)                    from   odf_subviews sv, odf_views vi
8/16/21, 10:31 PM (admin)                    where  vi.code = ?
8/16/21, 10:31 PM (admin)                    and    vi.partition_code = ?
8/16/21, 10:31 PM (admin)                    and    vi.object_code = ?
8/16/21, 10:31 PM (admin)                    and    vi.id = sv.child_view_id
8/16/21, 10:31 PM (admin)                    and    sv.parent_view_id = ?)

Cause

The agile object was corrupted

Resolution

Refreshed dataset from the Production environment to Development and installed the Agl addin