Skip to content
Advertisement

Tag: spring-batch

Why this error trying to unit test an entire Spring Batch Job? No qualifying bean of type ‘org.springframework.batch.core.Job’ available

I am working on a Spring Batch application. Untill now I was able to unit test something like service methods and something like this (as done in every Spring Boot application). Now I am trying to follow this tutorial in order to test an entire job from my unit test class (basically I want to execute a test method that

Why am I obtaining this error trying to start multiple Spring Batch Jobs? The bean ‘jobLauncher’….could not be registerd

I am working on a Spring Batch application containing two different Job bean (representing two different jobs). Both these jobs must be performed by my application (at the moment it can be done both sequentially and in parallel. It is not so important at the moment). In order to achieve this behavior I am trying to follow this documentation but

How to iterate over StaxEventItemReader/itemreader?

Currently I want to access the objects inside StaxEventItemReader. This is done by using StaxEventItemReader.read() (xml-file has 50 objects/items), so that I can do something with these objects. The question is how you can correctly iterate over the items of StaxEventItemReader? Originally I had something like this: The problem is that read() “reads a piece of input data and advance

explain how JobLauncherApplicationRunner class works?

I was reading the source code of JobLauncherApplicationRunner. according to my understanding when we use Spring boot + Spring batch, this class is used to find all the jobs in the application context and use SimpleJobLauncher to execute jobs in startup. I found some cases that contradicts my previous knowledge and if you help me out I will be grateful

Some doubts about this Spring Batch @Scheduled() annotation and how to manually start a Spring Batch job?

I am pretty new in Spring Batch and I have the following doubts about how to schedule the job start at a specific time. Into my project I have this SpringBatchExampleJobLauncher class: As you can see it contains the runSpringBatchExampleJob() method running the job at a specific time set by the cron expression into the Scheduled annotation: What is the

oracle sql date errors

I need your help! I have a sql query that is executed within a jdbcTemplate like shown here : Then i just make a call : I made the same steps for a Update query and it works perfectly fine!! BUt in Insert query, it shows this error : I think i don’t need TO_TIMESTAMP or TO_DATE because jdbcTemplate makes

Spring Boot Batch – Stop and Start a multithreaded step with CompositeItemWriter

I am trying to stop and start a multithreaded step through Scheduler. But I am getting exception as If I understand correctly we wont be able to restart an multithreaded step. But I am not restarting. I stop the job by stepExecution.setTerminateOnly() through ChunkListener() and trying to start this by jobLauncher.run() in a scheduler. Here is my codes; StopListener.java This

Advertisement