Delete Investments job may leave an investment unprocessed if there are orphaned requisition records

Document ID : KB000052712
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The 'Delete Investments' Job will not delete an investment if there are orphaned requisition records associated with the investment. The job generates a failed error message in the Background (BG) Services Log file. This is a generic error message, however if you execute the query identified you will see that there are orphaned records. Once these records are removed, the investments will be deleted as expected and no errors generated from the job for these projects.
The 'Delete Investments' job should check for this condition and remove these orphaned records and proceed to delete the investment.

-- snippet of Error Message --

ERROR 2015-04-23 14:34:09,725 [Dispatch Thread-86 : bg@SERVER] service.ODFService (none:none:none) processRequest Exception
java.lang.NullPointerException
...
WARN 2015-04-23 14:34:09,740 [Dispatch Thread-86 : bg@SERVER] niku.xql2 (none:none:none) Failed to delete records from query referenced in select deleteODF :com.niku.union.service.ServiceException: Service Exception
ERROR 2015-04-23 14:34:09,740 [Dispatch Thread-86 : bg@SERVER] xql2.xbl (none:none:none) Error while attempting to delete PR1068 (5002083)
ERROR 2015-04-23 14:34:09,740 [Dispatch Thread-86 : bg@SERVER] xql2.xbl (none:none:none) com.niku.union.odf.exception.ODFException: com.niku.union.service.ServiceException: Service Exception
...
WARN 2015-04-23 14:34:10,693 [Dispatch Thread-86 : bg@SERVER] niku.xql2 (none:none:none) Failed to delete records from query referenced in select deleteODF :com.niku.union.service.ServiceException: Service Exception
ERROR 2015-04-23 14:34:10,693 [Dispatch Thread-86 : bg@SERVER] xql2.xbl (none:none:none) Error while attempting to delete PR1032 (5001040)
ERROR 2015-04-23 14:34:10,693 [Dispatch Thread-86 : bg@SERVER] xql2.xbl (none:none:none) com.niku.union.odf.exception.ODFException: com.niku.union.service.ServiceException: Service Exception

Steps to Reproduce:

  1. Login to the application
  2. Select the following (example) projects and mark them for deletion
    PR1032 (5001040)
    PR1068 (5002083)
  3. Execute the 'Delete Investments' Job

Expected Result: The investment will be deleted without error.
Actual Result: The investment is not deleted and an error message appears in the BG-CA.LOG file.

Solution:

Execute the following SELECT statement to see if there are any orphaned Requisition records in the database associated with the team members within the investment.

** NOTE: Internal ID values will be different for different projects within your database **

select r.ID from rsm_req_requisitions r, inv_investments i
where r.REQUIREMENT_ID not in (select prid from prteam)
and r.object_id = i.id
and i.id in (5001040, 5002083)

If the results returns a count greater than zero, contact CA Technical Support for troubleshooting analysis and resolution.

 

STATUS/RESOLUTION:

Our sustaining team reviewed CLRT-57590 and closed it as they are not planning to make any changes to this area of the product.
For more details please review the Customer Reported Defect Resolution Policy for Clarity.  
Please report this to CA Technical Support for tracking more occurrences of this issue in the event that this issue is reviewed at a later time for reconsideration.