Time Slicing job fails with java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
search cancel

Time Slicing job fails with java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

book

Article ID: 239592

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Custom Fiscal Availability and Allocation slices that were created by database update hang Time Slicing job and eventually fail it with java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 on Time Slicing Quarter Rollover

Note that the Custom slice was created by manual insert in the database tables

STEPS TO REPRODUCE:

1.Create a custom slice
2.Set all slices for Monthly rollover
3.Run Time Slicing job - note it completes successfully
4.Now set all slices for Quarter rollover
5.Run Time Slicing

Expected Results: The Time Slicing to complete successfully
Actual Results: The Time Slicing job is hanging indefinitely or eventually fails with: 

INFO  2022-04-01 14:45:07,329 [Dispatch Time Slicing : bg@cccccc (tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing)  
INFO  2022-04-01 14:45:07,329 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing) Processing 0 new requests.
INFO  2022-04-01 14:45:07,329 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing) Finished Processing new requests.
INFO  2022-04-01 14:45:07,329 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing)  
INFO  2022-04-01 14:45:07,329 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing) Processing 3 expired requests.
INFO  2022-04-01 14:45:07,334 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing) ### Processing blobcrack.modifyTeam_set
ERROR 2022-04-01 14:45:07,338 [Dispatch Time Slicing : bg@cccccc(tenant=clarity)] niku.blobcrack (clarity:admin:session:Time Slicing) Exception during blobcrack process
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
                at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
                at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
                at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
                at java.base/java.util.Objects.checkIndex(Objects.java:372)
                at java.base/java.util.ArrayList.get(ArrayList.java:459)
                at com.niku.blobcrack.SliceRequest.getRolloverBoundaries(SliceRequest.java:1074)
                at com.niku.blobcrack.BlobCrackDB.doRollover(BlobCrackDB.java:560)
                at com.niku.blobcrack.BlobCrackDB.resetRequest(BlobCrackDB.java:488)
                at com.niku.blobcrack.BlobCrackDB.resetRequests(BlobCrackDB.java:631)
                at com.niku.blobcrack.BlobCrackDB.prepareSliceStatus(BlobCrackDB.java:1451)

Environment

Release : Any

Resolution

Update the custom fiscal slices to match exactly the DWH fiscal slices