Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent FatalStepExecutionException: JopRepository failure forcing rollback for Multi-threaded Step #4751

Open
AbhiramYay opened this issue Jan 23, 2025 · 0 comments
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug

Comments

@AbhiramYay
Copy link

Bug description
Facing Intermittent FatalStepExecutionException: JopRepository failure forcing rollback Exception for Multi-threaded Step

Below is the error message:

org.springframework.batch.core.step.FatalStepExecutionException: JopRepository failure forcing rollback
java.util.ConcurrentModificationException: null

org.springframework.dao.OptimisticLockingFailureException: Attempt to update step execution id=24 with wrong version (376), where current version is 377
org.springframework.batch.core.repository.dao.JdbcStepExecutionDao.updateStepExecution(JdbcStepExecution.java:294)

Environment
Spring Batch version: 5.13, Java 17, H2 database

Steps to reproduce
We have a step like below with taskExecutor

TaskExecutor taskExecutor, JobRepository jobRepository, PlatformTransactionManager transactionManager Beans are autowired.

   StepBuilder getStepBuilder(){
   new StepBuilder("sampleStep", jobRepository);
}

@Bean
public Step getDetailsStep() {
	return getStepBuilder()
				.<String, String>chunk(10, transactionManager)
				.reader(itemReader())
                                .processor(itemProcessor)
				.writer(itemWriter())
				.taskExecutor(taskExecutor)
				.build();
    




@AbhiramYay AbhiramYay added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug
Projects
None yet
Development

No branches or pull requests

1 participant