8,574 questions
-1
votes
1
answer
48
views
Spring Batch metadata tables are not automatically created in Spring Boot 4
I am trying to set up a Spring Batch project using Spring Boot 4.0.0
The application starts successfully, but the standard Spring Batch meta-data tables (e.g., BATCH_JOB_INSTANCE, BATCH_JOB_EXECUTION, ...
Best practices
0
votes
2
replies
37
views
Should we use GCP Cloud Run (not Cloud Run Jobs) for Java Spring Batch?
Currently, I have a Java Spring Batch source code that contains multiple batch jobs, with their execution schedules configured directly in the code. The application is currently running on a Windows ...
1
vote
2
answers
93
views
Spring Boot Batch 6.x: Job Parameters are null in Reader despite using @StepScope
I'm trying to pass job parameters from a REST controller to a batch job reader in Spring Boot Batch 6.x, but the parameters are always null in the reader. I'm using @StepScope and SpEL expressions as ...
Best practices
0
votes
2
replies
52
views
What is the most efficient way to validate file data against Couchbase documents using Spring Batch— N1QL timestamp range, KV lookups, or USE KEYS?
I have a validation use-case where an input file contains a list of records that were updated at a certain timestamp. I need to verify that the data in the file matches the data stored in Couchbase.
...
Best practices
0
votes
1
replies
96
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
62
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
48
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
67
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 ...
1
vote
1
answer
63
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
78
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
72
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
97
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
126
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 ...
1
vote
1
answer
202
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
93
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....