spring-projects / spring-projects/spring-batch
Step name is null in logs when scoped
Open
Nobody has claimed this yet.
status: waiting-for-reporter
type: bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
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 ..."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java around line 237 and compare the scoped proxy behavior of getName() with direct access to name. Done means the error log reports the step name instead of null when the step is defined with @JobScope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100