Bug 5602 - BatchStatus in JobStatus should be always initialised
BatchStatus in JobStatus should be always initialised
Status: NEW
Product: jbatch
Classification: Unclassified
Component: RI
1
All All
: P5 normal
: ---
Assigned To: ScottKurz
RI_only
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-28 12:31 UTC by ccerbo
Modified: 2014-01-09 15:18 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.