$ the-wire · showcase
Spring Batch Fixes Null Step Name That Breaks JDBC Jobs
By RepoJournal · Filed · About Spring
A silent step-name bug in Spring Batch could crash your JDBC-backed jobs, and the fix is landing now.
Spring Batch is shipping a fix for a nasty edge case where a Step built via a StepBuilder without an explicit name and never exposed as a bean stays with a null name forever [1]. With a JDBC-backed JobRepository, SimpleJobRepository.createStepExecution() rejects a null step name with an IllegalStateException, so this is a production landmine for anyone using local Step variables inside @Bean methods. The same repo also tightens MongoCursorItemReaderBuilder sorts field validation [2] and corrects the exception message in TaskExecutorJobLauncher to pass the running JobExecution instead of JobInstance details [3]. Docs got a refresh too: the JavaDoc for BatchStatus.isLessThanOrEqualTo now correctly says it performs a "less than or equal to" comparison [4]. Meanwhile, Spring Session bumps its Gradle release plugin from 1.0.16 to 1.0.17 [5][6]. All quiet on the security front; these are maintenance and correctness fixes, not emergency patches. The step-name fix is the one to prioritize if you rely on JDBC job repositories.
Action items
- → Review your Spring Batch step definitions for unnamed steps that aren't exposed as beans and patch when the fix lands spring-projects/spring-batch [plan]
- → Update Spring Session's spring-security-release-plugin to 1.0.17 in your Gradle build spring-projects/spring-session [monitor]
References
- [1] Default step name to its class name when not set explicitly nor as a bean spring-projects/spring-batch
- [2] Fix MongoCursorItemReaderBuilder sorts field validation logic spring-projects/spring-batch
- [3] Fix inaccurate exception message in TaskExecutorJobLauncher spring-projects/spring-batch
- [4] GH-5285: Clarify JavaDoc of BatchStatus.isLessThanOrEqualTo ↗ spring-projects/spring-batch
- [5] Bump io.spring.gradle:spring-security-release-plugin from 1.0.16 to 1.0.17 ↗ spring-projects/spring-session
- [6] Bump io.spring.gradle:spring-security-release-plugin from 1.0.16 to 1.0.17 ↗ spring-projects/spring-session