# Run 2: a brand-new JVM, the SAME job parameters, the corrected file

sed -i '48s/ABC-0005/ABC-0999/' scenario-data/restart-demo/input.csv   # the only change

$ java -jar target/spring-batch-1.0.0.jar --spring.profiles.active=broken \
    --import.file=file:scenario-data/restart-demo/input.csv \
    --spring.datasource.url=jdbc:h2:file:.../scenario-data/restart-demo/db   # same db file

2026-09-13T06:23:13.205Z  INFO 5386 --- [           main] o.s.batch.core.step.AbstractStep         : Executing step: [importStep]
2026-09-13T06:23:13.232Z  INFO 5386 --- [           main] o.s.batch.core.step.AbstractStep         : Step: [importStep] executed in 28ms
2026-09-13T06:23:13.240Z  INFO 5386 --- [           main] o.s.batch.core.step.AbstractStep         : Executing step: [reportStep]
REPORT: 58 products now in the PRODUCT table
2026-09-13T06:23:13.246Z  INFO 5386 --- [           main] o.s.batch.core.step.AbstractStep         : Step: [reportStep] executed in 6ms
JOB FINISHED: status=COMPLETED exitCode=COMPLETED

$ SELECT step_execution_id, job_execution_id, status, read_count, write_count, commit_count, rollback_count FROM BATCH_STEP_EXECUTION ORDER BY step_execution_id;
STEP_EXECUTION_ID | JOB_EXECUTION_ID | STATUS    | READ_COUNT | WRITE_COUNT | COMMIT_COUNT | ROLLBACK_COUNT
1                 | 1                | FAILED    | 50         | 38          | 4            | 1
2                 | 2                | COMPLETED | 20         | 20          | 2            | 0
(2 rows, 22 ms)

$ SELECT COUNT(*) FROM PRODUCT;
COUNT(*)
58
(1 row, 19 ms)
