Problem Statement:Getting error
ORA-08177: can't serialize access for this transaction in spring batch application. Error:org.springframework.dao.CannotSerializeTransactionException: PreparedStatementCallback; SQL [INSERT into BATCH_JOB_INSTANCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION) values (?, ?, ?, ?)]; ORA-08177: can't serialize access for this transaction ; nested exception is java.sql.SQLException: ORA-08177: can't serialize access for this transaction
I am using only one instance of datasource throughout spring batch application. Datasource:
@Autowired
@Qualifier("legal")
@Bean
static DataSource dataSourceLegal() {
DriverManagerDataSource driverManagerDataSource = new DriverManagerDataSource();
driverManagerDataSource.setUrl(url);
driverManagerDataSource.setUsername(userName);
driverManagerDataSource.setPassword(pwd);
driverManagerDataSource.setDriverClassName(driver);
return driverManagerDataSource;
}