Bug 5602

Summary: BatchStatus in JobStatus should be always initialised
Product: jbatch Reporter: ccerbo
Component: RIAssignee: ScottKurz
Status: NEW ---    
Severity: normal CC: ccerbo, issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: RI_only

Description ccerbo 2013-11-28 12:31:27 UTC
JobStatus has two constructors, but only in the second one the BatchStatus is set to STARTING. I think, it should be STARTING in both cases.

Otherwise when I try to restart a Job that was interrupted by killing the JVM (SE modus), the following exception is thrown (because JobStatus#batchStatus is null):

java.lang.IllegalStateException: On restart, we didn't find an earlier batch status.
	at com.ibm.jbatch.container.jobinstance.JobExecutionHelper.validateJobInstanceNotCompleteOrAbandonded(JobExecutionHelper.java:183)
Comment 1 ScottKurz 2014-01-09 15:18:04 UTC
Thanks for the description.  Yes, looks like an easy change.

In noting this, I'm also acknowledging we plan on actually delivering this fix but I don't have a target date yet.