search cancel

Department location association removal in Clarity

book

Article ID: 203142

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

When dissociating the Location from a Department I get the following error: Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or other technical problems. Contact your site administrator.

So after checking the logs I get the following message:

ERROR 2020-11-06 13:20:29,581 [http-nio-8080-exec-264] web.WebActionController (clarity:[email protected]:19145220__08FC7ED6-310D-4955-99B8-1BCBDC6752E8:revmgr.deleteDeptLocnAssociation) com.niku.union.web.WebException: WebServiceAdapter::processRequest -> failed to process service request
...
java.base/java.lang.Thread.run(Thread.java:834)Caused by: com.niku.union.service.ServiceException: Error while parsing location or department Id at com.niku.odf.service.ODFActionService.processRequest

Environment

Any Clarity release

Cause

There are 2 records for the same department id and location id combination.

Resolution

To check for duplicates run the query 

select count(*),
locn_id,
dept_id
from locationdept
group by
locn_id,
dept_id
having count(*) > 1

If records are returned then there are duplicate department/location combinations and if there are transactions against them either part of the combination cannot be removed.

One combination will need to be updated, for example update the dept_id to 9999999  (invalid depart_id)

Since this requires direct database update please open a case with support.

Additional Information

Please also see:

Error 500 removing department location associations in Clarity