Create project ‘ERROR System error. Contact system administrator’, 'Cannot insert duplicate key row in object 'niku.INV_HIERARCHIES' with unique index 'INV_HIERARCHIES_U1''

Document ID : KB000098347
Last Modified Date : 31/08/2018
Show Technical Document Details
Issue:
The standard project creation process takes 4 minutes to compile and this causes several errors, especially when we select the standard workflow action known as "Convert Idea to Project".
 
Steps To Reproduce
 
1. Go to ‘Home’ -> ‘Projects’
2. Click on the ‘New’ button to create a project
3. Give it a project name
4. Click on the ‘Save’ button
 
Expected Result: For the project to be created straight away
 
Actual Result: The cursor keeps rotating round and after 5 minutes it fails with this error: ‘ERROR System error. Contact system administrator’.
 
App-ca.log:
ERROR 2018-05-23 16:14:06,464 [http-###-##-exec-####] niku.xql2 (clarity:admin:#######__########-####-####-####-############:projmgr.projectNewPost) Internal Processing exception
com.niku.union.persistence.PersistenceException:
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'niku.INV_HIERARCHIES' with unique index 'INV_HIERARCHIES_U1'. The duplicate key value is (<NULL>, #######).
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
 
Environment:
All CA PPM versions
Resolution:
1. Please remove lock in database by running these statements:-
 
Select * from niku.prlock where prname='~slLock'
Select * from prLock where prname=prInsertServiceLock
Delete from prlock where prname=~slLock
Delete from prLock where prname=prInsertServiceLock
 
2. Afterwards, please restart all the CA PPM services via the command prompt using these commands:-

service stop all
service start all