Questions tagged [spring-batch]

Spring Batch is a lightweight, comprehensive framework aimed at enabling the development of batch applications vital for the daily operations of enterprise systems. Batch applications in this context refers to automated offline systems targeted towards bulk data processing.

Spring Batch is a lightweight, comprehensive framework aimed at enabling the development of batch applications vital for the daily operations of enterprise systems. Batch applications in this context refers to automated offline systems targeted towards bulk data processing. Spring Batch automates this basic batch iteration, providing the capability to process similar transactions as a set, typically in an offline environment without any user interaction.

Spring Batch works by reading data with a configurable chunk size from a data source, processing it and finally writing it to a resource.
The data source (i.e. process input) and the data sync (i.e. process output) can be flat files (text file, XML file, CSV file...), SQL Databases (MySQL...) or NoSQL databases (MongoDB...).

Related Tags

Online Resources

8349 questions
2
votes
3 answers

Spring Batch + HSQL DB error - user is not having previlage

I am using Spring Batch 3.0.5 and Spring Boot, along with job launcher, but whenever I run my job I get the following error: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT VERSION FROM…
2
votes
1 answer

Inject beans into spring-batch item reader

See below for 1 update I'm trying to inject a Service or DAO bean into my spring-batch ItemReader. However the injected reference is NULL. I tried this using @Autowire and explicit bean configuration in the XML file. The job is being run from a…
tggm
  • 973
  • 2
  • 15
  • 41
2
votes
0 answers

HttpClient 4.5.2 Proxy setting

I need to call third party web service via proxy. I only have information below: - Third party https IP & Port - Proxy http IP & Port May I know I need credential : username & Password for the Proxy? Part of my code below:- CloseableHttpClient…
2
votes
1 answer

customEditors property of CustomEditorConfigurer with RangeArrayPropertyEditor, Spring 4.3.3 with Spring Batch 3.0.7

I am using Spring 4.3.3 with Spring batch 3.0.7 and getting this exception: Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.util.LinkedHashMap] to required type [java.util.Map] for…
Chenna
  • 39
  • 3
2
votes
1 answer

How do you handle blank non String values with a FieldSet in FieldSetMapper?

I am using common FieldSetMapper logic found through searches and in examples on StackOverflow and I have run into a situation which surprised me. Either it is a feature or a bug, but I thought I would present it here for review to see how others…
Tony Edwards
  • 431
  • 1
  • 7
  • 18
2
votes
1 answer

Spring Batch AmqpItemReader, AmqpItemWriter example

I'm trying to read data from a queue (RabbitMq) using spring batch. But I can't find any example on the internet for guidance. Please help with an example spring batch reader and writer using AmqpItemReader and AmqpItemWriter respectively. XML…
2
votes
1 answer

Spring batch integration file lock access

I have a spring batch integration where multiple servers are polling a single file directory. This causes a problem where a file can be processed up by more than one. I have attempted to add a nio-lock onto the file once a server has got it but…
2
votes
2 answers

Spring Reactor vs Transactional; Handling failures and Restarting Jobs

Our Spring Web Application uses Spring Batch with Quartz to carry out complex jobs. Most of these jobs run in the scope of a transaction because if one part of the complex system fails we want any previous database works to be rolled back. We would…
IcedDante
  • 6,145
  • 12
  • 57
  • 100
2
votes
1 answer

Spring batch - restart FAILED job that uses TaskExecutor

What is the proper way to restart FAILED spring batch job that is using TaskExecutor? I have a job that is loading data from HTTP and sometimes there is 500 error - making this job fail). I would like to restart this job until it is successful. If…
Marko Kraljevic
  • 401
  • 4
  • 19
2
votes
1 answer

Spring Batch: File not being read

I am trying to create an application that uses the spring-batch-excel extension to be able to read Excel files uploaded through a web interface by it's users in order to parse the Excel file for addresses. When the code runs, there is no error, but…
2
votes
1 answer

SpringBatch - javaconfig vs xml

I have been using Xml configuration for Spring Batch for a while, and feel it is simpler and concise. However, nowadays, people are suggesting to use javaconfig over xml. I googled this topic. This site tells us why javaconfig is better …
2
votes
1 answer

Spring batch Read/write in the same table

I have spring batch application which reads and writes into the same table. I have used pagination for reading the items from the table as my data volume is quite high. When I set the chunk size as more than 1 then my pagination number is getting…
DarkCrow
  • 785
  • 2
  • 8
  • 29
2
votes
1 answer

Extend partitioning to one more level

As per below image from Spring Batch Doc, A master step is getting partitioned into Six Slave steps which are identical copies of master. My question is, can I extend partitioning to one more level or N more levels? i.e. All of six slaves becomes…
Sabir Khan
  • 9,826
  • 7
  • 45
  • 98
2
votes
2 answers

How to update item count in spring-batch Tasklet?

I'd like to create a generic StepExecutionListener. It should log the item count processed by a Tasklet step. Problem: the count is not updated automatically. So I probably have to do this somewhere in Tasklet.execute(). But how? @Bean …
membersound
  • 81,582
  • 193
  • 585
  • 1,120
2
votes
1 answer

Location and UseCase for AggregateItemReader

Appendix Here lists a reader AggregateItemReader but I am not able to find it in any of Spring Batch jar files. I am using spring batch with spring boot and have version 3.0.7. API Doc indicates it in samples package. Currently, I am using…
Sabir Khan
  • 9,826
  • 7
  • 45
  • 98