Closed
Description
I didn't find any obvious duplicate but maybe I'm also misunderstanding the scopes of the Spring Batch project, so maybe this "bug" is really as designed.
Bug description
If a job is run with LocalDate or LocalDateTime job parameters, the run fails because the execution cannot be persisted.
An exception like "No converter found capable of converting from type [java.time.LocalDate] to type [java.lang.String]" is thrown.
Environment
- Spring Boot 3.0.0
- Spring Batch 5.0.0
- H2 Database 2.1.214
- OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
- macOS 13.0.1
Steps to reproduce
- Prepare
JobParameters
using theJobParametersBuilder
with eitherLocalDate
orLocalDateTime
instances. - Run any job with the aforementioned job parameters
Expected behavior
Since the builder offers convenience methods, I would expect the job execution to just complete with either of them.
Minimal Complete Reproducible example
https://gitlab.com/winfr34k/spring-batch-localdate-reproducer