Error message thrown in BG service log, and processes are stuck

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

Description:

After bg restart, the step definition does not exist in the process engine's step definition cache. An array out of bounds exception is thrown:

SYS 2012-01-18 13:45:14,164 [Niku Job Scheduler] njs.SchedulerImpl 
(none:none:none) Clarity 12.0.6.5471 Job Scheduler 
bg@xxxxx initializing... 
SYS 2012-01-18 13:45:15,112 [Niku Job Scheduler] njs.SchedulerImpl 
(scheduler:131699962__-1955a84a:none) Clarity 12.0.6.5471 Job Scheduler 
bg@xxxxx initialized 
SYS 2012-01-18 13:45:19,838 [Event Interest Registration Thread] 
niku.union (none:none:none) Event registration completed. Event manager 
started succesfully. 
ERROR 2012-01-18 13:46:18,824 [Post Condition Transition Pipeline 1] 
bpm.engine (process_admin:131699967__-1955a84a:none) An error occurred when 
loading Step from persistence: 5000662 
com.niku.bpm.BpmException: Cannot create object descriptor for object: 
actionitem name: step_5.ActionItem-step_5 
 at 
com.niku.bpm.ui.ExprBuilderDataService.createObjectDescriptor(ExprBuilderDat 
aService.java:289) 
 at 
com.niku.bpm.ui.ExprBuilderDataService.createObjectDescriptors(ExprBuilderDa 
taService.java:190) 
 at 
com.niku.bpm.engine.exprevaluator.ExprEvaluatorDataService.loadAllVariablesF 
orStep(ExprEvaluatorDataService.java:240) 
 at 
com.niku.bpm.defobjects.DefinitionPersistenceUtils.getStep(DefinitionPersist 
enceUtils.java:97) 
 at 
com.niku.bpm.engine.objects.StepCache.getFromPersistence(StepCache.java:52) 
 at com.niku.union.utility.caching.LazyCache.get(LazyCache.java:67) 
 at 
com.niku.bpm.defobjects.ProcessDefinitionController.getStep(ProcessDefinitio 
nController.java:55) 
 at 
com.niku.bpm.engine.rules.PostConditionTransitionPipeline.evaluatePostCondit 
ions(PostConditionTransitionPipeline.java:134) 
 at 
com.niku.bpm.engine.rules.PostConditionTransitionPipeline.execute(PostCondit 
ionTransitionPipeline.java:79) 
 at com.niku.bpm.engine.rules.Pipeline.run(Pipeline.java:221) 
Caused by: java.lang.ArrayIndexOutOfBoundsException: 16 
 at java.util.ArrayList.add(ArrayList.java:352) 
 at 
com.niku.union.odf.object.schema.ObjectAttributeType.setNls(ObjectAttributeT 
ype.java:2269) 
 at 
com.niku.bpm.ui.ExprBuilderDataService.addAIAttributes(ExprBuilderDataServic 
e.java:438) 
 at 
com.niku.bpm.ui.ExprBuilderDataService.createObjectDescriptor(ExprBuilderDat 
aService.java:280) 
 ... 9 more 

and many of subsequent process steps are stuck with error:

ERROR 2012-01-25 06:25:19,013 [Pre Condition Pipeline 0] bpm.engine 
(process_admin:131699960__-1955a84a:none) Error (will retry) caused by Step 
Instance: com.niku.bpm.engine.objects.StepInstance@12df0b2 [Id: 6609067 
Process Instance Id: 5925017 Step Id: 5000662 State: 
BPM_SIS_READY_TO_EVAL_PRECON Step Name: null Start Date: 2012-01-19 
14:47:51.0 Expected End Date: null Percent Complete: 0.466667 Warned: false 
Retry Count: 1626 No of Pre Conditions: -1 No of Post Conditions: -1 Last 
Condition Eval Time: 0 Pre Condition Wait Events: null Post Condition Wait 
Events: null Pass Conditions: null Error Id: -1 
Process Thread: com.niku.bpm.engine.objects.ProcessThread@115526b [Id: 
5925017 Parent Step Instance Id: -1 Join Step Instance Id: -1] 
Split Threads: null 
Join Threads:null] 
com.niku.bpm.BpmException: Cannot get step definition by step ID 5000662 

Solution:

This is a known Clarity defect:

CLRT-66879 Potential thread safety issue while loading Process engine

Steps to Reproduce:

  1. Start bg with Process engine

  2. On loading, synchronization of threads fails, and error is thrown

Expected Result: threads to be loaded correctly and concurrently
Actual Result: errors in logs and as consequence processes do not start and execute correctly
Workaround: restart bg

This defect is currently in review with Development.