Spring Batch hangs when using HSQLDB as Embedded Datasource
I got a simple batch job that send a query to a DB (H2, HSQLDB, or etc.) and prints out a number that keeps incrementing. I extended DefaultBatchConfiguration to test out different type of embedded databases for Spring Metadata. For H2 the job completed, but for HSQLDB, it just hangs. Last few lines of log where it hangs: 2024-08-27T15:57:36.029-04:00 INFO 2520 --- [ main] com.test.AppConfiguration : Started AppConfiguration in 2.414 seconds (process running for 2.898) Starting the batch job 2024-08-27T15:57:36.079-04:00 INFO 2520 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=testJobName]] launched with the following parameters: [{}] 2024-08-27T15:57:36.109-04:00 INFO 2520 --- [ taskExecutor-1] o.s.batch.core.job.SimpleStepHandler : Executing step: [partitionedStep] 2024-08-27T15:57:36.111-04:00 INFO 2520 --- [ taskExecutor-2] o.s.batch.core.job.SimpleStepHandler : Executing step: [partitionedStep] The source code on GitHub: Source Code
I got a simple batch job that send a query to a DB (H2, HSQLDB, or etc.) and prints out a number that keeps incrementing.
I extended DefaultBatchConfiguration
to test out different type of embedded databases for Spring Metadata. For H2
the job completed, but for HSQLDB
, it just hangs.
Last few lines of log where it hangs:
2024-08-27T15:57:36.029-04:00 INFO 2520 --- [ main] com.test.AppConfiguration : Started AppConfiguration in 2.414 seconds (process running for 2.898) Starting the batch job 2024-08-27T15:57:36.079-04:00 INFO 2520 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=testJobName]] launched with the following parameters: [{}] 2024-08-27T15:57:36.109-04:00 INFO 2520 --- [ taskExecutor-1] o.s.batch.core.job.SimpleStepHandler : Executing step: [partitionedStep] 2024-08-27T15:57:36.111-04:00 INFO 2520 --- [ taskExecutor-2] o.s.batch.core.job.SimpleStepHandler : Executing step: [partitionedStep]
The source code on GitHub: Source Code