Synchronize portfolio investments job error: Index -3 out of bounds for length 7
search cancel

Synchronize portfolio investments job error: Index -3 out of bounds for length 7

book

Article ID: 191234

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Synchronize portfolio investments job error: Index -3 out of bounds for length 7
When looking at the bg-ca.log file you see:

ERROR 2020-05-14 06:58:39,832 [Dispatch Synchronize portfolio investments : [email protected] (tenant=clarity)] pfm.jobPFMRoleDemandQueryUtil (clarity:[email protected]:89371339__9AE907AD-E40C-4B87-B373-53DCAC7688CF:Synchronize portfolio investments) Could not process demand for record with start date Wed Sep 03 08:00:00 PST 1012 and finish date Thu Jun 16 00:00:00 PDT 2011
ERROR 2020-05-14 06:58:39,834 [Dispatch Synchronize portfolio investments : [email protected] (tenant=clarity)] pfm.jobPFMRoleDemandQueryUtil (clarity:[email protected]:89371339__9AE907AD-E40C-4B87-B373-53DCAC7688CF:Synchronize portfolio investments) Error encountered processing demand or actuals for investment with id 5002176 and team resource id 5006040
ERROR 2020-05-14 06:58:39,835 [Dispatch Synchronize portfolio investments : [email protected] (tenant=clarity)] job.PFMSyncManager (clarity:[email protected]:89371339__9AE907AD-E40C-4B87-B373-53DCAC7688CF:Synchronize portfolio investments) 
java.lang.ArrayIndexOutOfBoundsException: Index -3 out of bounds for length 7
 at com.niku.xmlserver.blob.NkCalendar.getShifts(NkCalendar.java:211)
 at com.niku.xmlserver.blob.NkCalendar.getShifts(NkCalendar.java:223)
 at com.niku.xmlserver.blob.NkCalendar.diffWorktime(NkCalendar.java:699)
 at com.ca.clarity.pfm.job.PFMRoleDemandQueryUtil.calculateDemandForRole(PFMRoleDemandQueryUtil.java:195)
 at com.ca.clarity.pfm.job.PFMRoleDemandQueryUtil.getDemandData(PFMRoleDemandQueryUtil.java:69)
 at com.ca.clarity.pfm.job.PFMRoleSyncAggregator.processRoleAggregationForElement(PFMRoleSyncAggregator.java:733)
 at com.ca.clarity.pfm.job.PFMRoleSyncAggregator.aggregateRoleDemandForElement(PFMRoleSyncAggregator.java:717)
 at com.ca.clarity.pfm.job.PFMRoleSyncAggregator.aggregateRoleDemand(PFMRoleSyncAggregator.java:587)
 at com.ca.clarity.pfm.job.PFMRoleSyncAggregator.aggregateRoleDemand(PFMRoleSyncAggregator.java:390)
 at com.ca.clarity.pfm.job.PFMSyncManager.run(PFMSyncManager.java:106)
 at com.ca.clarity.pfm.job.PortfolioSyncJob.scheduledEventFired(PortfolioSyncJob.java:133)
 at com.niku.njs.Dispatcher$BGTask.run(Dispatcher.java:657)
 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 at java.base/java.lang.Thread.run(Thread.java:834)

Cause

As per the log file, the team member allocation dates are not correct:
Could not process demand for record with start date Wed Sep 03 08:00:00 PST 1012 and finish date Thu Jun 16 00:00:00 PDT 2011
Error encountered processing demand or actuals for investment with id 5002176 and team resource id 5006040

Resolution

1. Go to Clarity
2. Locate the project and team member referred on the logs files
3. The Start date is set to Year 1012.
4. Please ensure the team allocation date and project finish date are set to a correct date
5. Re-run the Portfolio Synchronization