Hello,
We are trying to pass some simple parameters from one Job to another. Code looks like this:
ctx.putLong(CLAIM_ID, currentClaim.getId());
System.out.println("Claim id in exn ctx "+se.getExecutionContext().getLong(CLAIM_ID));
se.setExecutionContext(ctx);
In the following step we access the ExecutionContext like this:
ExecutionContext cxt = se.getExecutionContext();
System.out.println("Claim id: "+ cxt.getLong(CLAIM_ID));
Resulting in this error:
INFO: Job: [SimpleJob: [name=simpleJob]] failed with the following parameters: [{}{timeOfKickoff=1208842406699}{}{}]
java.lang.ClassCastException: Value for key=[claimId] is not of type: [class java.lang.Long], it is [null]
We are using an In-Memory Job Repository and, as you can tell from the exception, a SimpleJob.
Does and ExecutionContext not get passed between steps when using an in-memory repo?
Any clues appreciated.
Thanks, Sjoerd


Reply With Quote