spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Step name is null in logs when scoped

Open Sam-Kruglov opened this issue 3 years ago • 1 comments

https://github.com/spring-projects/spring-batch/blob/e8e3f5da085c6fedad54094b5d410b06f57f1594/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java#L237

I have my step defined as @JobScope, so it's wrapped in a proxy. During debugging at this line, this.getName() returns the name but this.name returns null. So, this log above prints "Encountered an error executing step null ..."

Sam-Kruglov avatar Dec 06 '21 23:12 Sam-Kruglov

I tried to reproduce this problem but was unable to do so. Can you provide a small sample that shows this behavior? Thanks!

cppwfs avatar Feb 02 '22 00:02 cppwfs