8,579 questions
Best practices
0
votes
1
replies
65
views
Hibernate 5: Use @Transactional or manual Transaction with StatelessSession for batch inserts?
I’m migrating batch insert code from Hibernate 4 to Hibernate 5.1 and want to confirm the correct transactional pattern for StatelessSession.
Legacy code (Hibernate 4):
@Transactional
public void ...
Best practices
0
votes
0
replies
33
views
HikariCP: connection-timeout and maximum-pool-size with long running queries
I am using a Postgres database. I have configured it to support multi-tenancy with a different schema for each tenant.
Overnight, my Spring Boot application runs several processes in parallel (around ...
Best practices
0
votes
2
replies
44
views
Group and process unordered records in a CSV file with Spring Batch
A CSV file needs to be processed using Spring Batch where multiple rows could be grouped based on a field value. In the below sample, two lines in the CSV have the same GROUP_NAME with the value ...
0
votes
0
answers
56
views
"DefaultJpaDialect does not support custom isolation levels" when upgrading to spring batch 5
I am upgrading an app to newest Spring Boot 3, and because of that Spring Batch is upgraded to 5.2.3 (from 4.3.10).
The application did not persist batch states previously, it was using the "map ...
0
votes
0
answers
44
views
MultiResourceItemWriter does not work with transactional StaxEventItemWriter
I configured a StaxEventItemWriter like this:
@Bean
public StaxEventItemWriter<Foo> fooWriter() {
return new StaxEventItemWriterBuilder<Foo>()
.name("fooWriter")
...
0
votes
0
answers
73
views
Partitioned batch intermittently delays In Message Processing
We run through a series of Spring Batch jobs, some normal some partitioned around a cluster. (still on Spring Batch 4.3.10). After a while (sometimes takes a couple of runs) we observe delays in the ...
0
votes
1
answer
47
views
Spring Batch write multiple chunks at once/ aggregate writing of chunks after reaching threshold
I am using Spring Batch for the first time.
Currently, my setup is as follows:
one Kafka reader, one item processor, one JDBC writer (custom one)
the Kafka reader reads items from Kafka
chunk size is ...
0
votes
1
answer
90
views
Spring Batch Remote Partitioning: Worker replies reach channel but manager never receives them
I'm implementing Spring Batch remote partitioning with Spring Integration and Kafka as a middleware. Worker replies successfully arrive at the managerInboundReplies channel (confirmed via interceptor ...
1
vote
2
answers
113
views
Batch job using Spring-batch@5 not triggered with @Scheduled annotation
I'm trying implementing scheduled batch job with Spring-batch@latest and Scheduler@latest.
Both batch job and scheduler trigger work fine collectively.
The problem occurs when I put @Scheduled on the ...
0
votes
1
answer
139
views
Spring Batch jobs failing with duplicate key / serialization errors after upgrading to Spring Boot 3
We have a standalone Spring Boot application (previously on Spring Boot 2.x.x) that runs scheduled jobs using Spring Batch. We run a large number of batch jobs, and multiple jobs can be triggered at ...
0
votes
0
answers
86
views
How to override Spring Batch Step ExitStatus when ItemReader.read() throws an exception?
Problem
When my ItemReader.read() throws an exception, the step is marked FAILED.
In my afterStep listener I try to override it with:
stepExecution.setStatus(BatchStatus.COMPLETED);
stepExecution....
0
votes
1
answer
128
views
Spring Batch Cannot change transaction isolation level in the middle of a transaction
After updating to Spring Boot 3.4.3 and consequently to Spring Batch 3.5.5, I started getting an error when starting the Job. Previously, I used Spring Batch 2.6.4 and there were no errors.
Job config:...
1
vote
2
answers
117
views
Int range in Spring Boot Batch
I have a Spring Batch application, where I transfer data from one database to another (the target DB is PostgreSQL, with enough space).
I'm executing the following query:
SELECT s.name, s.brand
FROM ...
0
votes
0
answers
33
views
Springbatch - Child job passed, but parent step completed with exit code as unknown
After spring upgrade, I am facing an issue.
<spring.version>5.3.31
<spring.batch.version>4.3.10 <spring.integration.version>5.5.20
calling another job - , Job C is ...
0
votes
1
answer
141
views
Error after Upgrade SpringBoot in our Spring Batch Application
We are using Spring Batch in our application and after upgrading the SpringBoot Version from 2.7.X (uses spring batch 4.X) to 3.1.X (uses spring batch 5.x) version we are getting the exception while ...