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
1 answer

Spring batch multithreading: throttle-limit impact

I have a multi-threaded Step configured with a threadpool with a corePoolSize of 48 threads (it's a big machine) but I did not configure the throttle-limit. I am wondering if I have been under utilizaing the machine because of this. The Spring…
Antonio Dias
  • 319
  • 3
  • 17
2
votes
4 answers

How to pass JobParameters to the Spring Batch Junit Test case JobLauncherTestUtils?

I am newbie to the Spring Batch, I have a following main program which I want to convert it into the test case using jobLauncherTestUtils. How we can do that? I followed http://docs.spring.io/spring-batch/reference/html/testing.html, but I don't see…
user5778069
2
votes
1 answer

Using JobExecutionDecider with spring boot batch

I made a projet with Spring Batch few month ago. This project is working fine and is including an implementation of JobExecutionDecider public class BatchDecider implements JobExecutionDecider { private static final Logger log =…
D. Cesar
  • 41
  • 1
  • 5
2
votes
1 answer

How to handle Spring Batch step execution context that is too large?

I have been using Spring Batch and so far everything has run pretty well. Lately though, we have been getting issues related to the step execution context. The error is below: Encountered an error saving batch meta data for step…
Matthew Ailes
  • 21
  • 1
  • 4
2
votes
1 answer

How to integrate spring batch admin console

I'm using jhipster and I want to integrate spring batch admin console in my webapp. (http://localhost:8080/batch-console for example) I tried to integrate the following response in my jhipster webapp Is there a way to integrate spring-batch-admin…
Vincent
  • 21
  • 4
2
votes
0 answers

How to provide an EntityManager for Batch started with SimpleAsyncTaskExecutor

I have Spring Boot App with Batches. I want to start the Baches asynchronously so i am using the SimpleAsyncTaskExecutor for it. My problem is that the Batches are performing some persistent operations so they need to use the EntityManager - At this…
2
votes
2 answers

Spring Batch : How to instantiate "Step" scope bean in Cucumber Testing?

How to instantiate "Step" scope bean of spring in Cucumber Testing? SpringJUnit4ClassRunner uses @TestExecutionListeners to instantiate the step scoped beans for testing purpose. I am trying get this behavior in Cucumber. Cucumber uses a…
2
votes
2 answers

Monitor the progress of a spring batch job

I am writing various jobs using spring batch with java configuration. I need to get the current state of the job e.g. which steps are currently running (I may have multiple steps running at the same time) Which steps failed (the status and exit…
Tomer
  • 31
  • 2
  • 3
2
votes
2 answers

Make Spring 4 Batch service repeatable on Scheduled execution

I've been trying to solve this issue for few days and I couldn't make it. I'm quite new with Spring 4, so maybe someone with experience can tell me how to do it. I was trying to learn how to code a Spring Batch with the latest version of the…
2
votes
1 answer

Spring boot @SpyBean tries to instantiate a new bean instead of spying the one in context

I'm trying to unit-testing a Spring batch job inside Spring boot using JUnit. I wrote this test class where I want to spy the bean ItemReader : @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment=WebEnvironment.NONE) @ActiveProfiles({"dev",…
lincetto
  • 972
  • 2
  • 13
  • 28
2
votes
2 answers

How to change a value in XML programmatically

I have a spring batch application. The database that is used to store meta-data of spring batch job is configured like the following: In application-context.xml:
Sumit
  • 856
  • 5
  • 18
  • 38
2
votes
1 answer

Spring Batch::How to generate file on sftp server using Spring Batch?

I am using Spring Batch 2. version.I have generated the csv file and able to save in csv format on local. Now I want to generate the same file but it will be stored on SFTP server. I had gone through some tutorial which generates file on sftp server…
Vaibs
  • 1,546
  • 9
  • 31
2
votes
2 answers

Spring Batch - ORA-08177

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 ;…
Arul
  • 75
  • 1
  • 11
2
votes
0 answers

Run parallel jobs in Spring Batch

I want to run jobs in parallel. I have tried many solution from below links:- using spring batch to execute jobs in parallel How to run spring batch jobs in parallel What I want is- I have 3 Jobs doing different processes as follows:- (I have n…
rucha
  • 135
  • 1
  • 9
2
votes
1 answer

I would like to create a spring batch project where batch does not use my datasource

I have seen a lot of examples of Spring Batch projects where either (a) a dataSource is defined, or (b) no dataSource is defined. However, in my project, I would like my business logic to have access to a dataSource, but I want Spring Batch to NOT…
wiltonio
  • 121
  • 2
  • 5