L00001
L00001

Reputation: 41

Encountered an error executing step in job

Can someone help me resolve this? I'm getting an error:

Encountered an error executing step in job: java.lang.IllegalArgumentException: Name must be assigned for the sake of defining the execution context keys prefix

Upvotes: 3

Views: 6136

Answers (2)

Lucía Tello
Lucía Tello

Reputation: 71

I don't use XML anymore so this is what worked for me:

I am using AbstractItemCountingItemStreamItemReader as a parent abstract class for my reader.

I just called the method setName() in the overridden function doOpen().

@Override
protected void doOpen() throws Exception {
   source = service.findMyData();
   setName(MyReader.class.getName());
}

Hope it helps somebody !

Upvotes: 7

L00001
L00001

Reputation: 41

Solved this by using @StepScope annotation in my reader.

Thanks

Upvotes: -1

Related Questions