Questions tagged [java-batch]
84 questions
2
votes
0 answers
Spring Boot Batch Job is not called by Scheduler
This is Main Class.
now, my problem is :
The scheduler works and it repeats every one min,
but the job executes only on application startup(reader, processor and writer just execute once in a startup) and when scheduler trigger in main class it is…

Ayush
- 173
- 1
- 1
- 12
2
votes
1 answer
Can I define one common StepListener for all steps? Java Batch Jobs API
I have written a JobStepListener which needs to be executed before and after each step. However each job contains many steps (over 1000 steps) and it would be tedious to insert the listener inside each step, especially since I have multiple jobs…

CyberProwler
- 73
- 6
2
votes
1 answer
CDI not working with Java EE Batch under jberet implementation
I have a Java EE batch application implemented with jberet deployed on WildFly application server. This application also expose a REST api to trigger a job on demand.
I have following class creating beans to be injected:
public class Factory {
…

adesai
- 370
- 3
- 22
2
votes
1 answer
Java Batch Step with partition returns wrong batchStatus and exitStatus
I have a (very simple) java batch job in JDL with just two steps.
When the step "download" return the status "STOPPED" the job should stop.
After restart the stop notify should be called.
Without the partition everything works fine.
stats without…

unclescrouge
- 403
- 5
- 10
2
votes
1 answer
JSR-352 with Liberty Profile - 'ORA-01002: fetch out of sequence'
I am experimenting with the JSR-352 implementation in the Liberty Profile and have been stumped by an 'ORA-01002: fetch out of sequence' error after my reader processes the first 10 items of my JDBC ResultSet. My chunk size is set to 100.
Here is…

Colby Montgomery
- 51
- 5
2
votes
1 answer
JUnit test case for Java Batch
We have a existing project which is using Java Batch and we need to write JUnit for that. While searching I am getting examples for Spring Batch but not for Java Batch. Can someone please share an example?

Rohit
- 41
- 1
- 3
2
votes
2 answers
JSR:352 Unit testing Java Batch Code?
Can we use JUnit to test java batch jobs? Since Junit runs locally and java batch jobs run on the server, i am not sure how to start a job (i tried using using the JobOperator class) from JUnit test cases.
If JUnit is not the right tool, how can we…

Fazil Hussain
- 425
- 3
- 16
2
votes
1 answer
JSR 352: Is it possible to run different partitions of the same step in the same job in Multiple JVMs?
If so, How?
I am using IBM's implementation of JSR 352 on WebSphere Liberty.

Fazil Hussain
- 425
- 3
- 16
2
votes
1 answer
JSR 352 : How do you write to a MVS Dataset from a Java Batch program?
I need to write to a non-VSAM dataset in the mainframe. I know that we need to use the ZFile library to do it and I found how to do it here
I am running my Java batch job in the WebSphere Liberty on zOS. How do I specify the dataset? Can I directly…

Fazil Hussain
- 425
- 3
- 16
2
votes
1 answer
JSR352: Monitoring Status of Job, Step and Partitions?
IBM's version of JSR352 provides a Rest API which can be used to trigger jobs, restart them, get the job logs. Can it also be used to get the status of each step and each partition of the step?
I want to build a job monitoring console from where i…

Fazil Hussain
- 425
- 3
- 16
2
votes
2 answers
JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level
I have a WAR application that includes a JAR library. The JAR library contains the Batch Job and the Batch Artifacts (META-INF/batch-jobs/...). The WAR app includes this jar as a library and defines a JAX-RS Service that allows to clients to invoke…

Carlitos Way
- 3,279
- 20
- 30
2
votes
1 answer
Is it possible to process a filestream while uploading with JSF and Java EE Batch?
I want to process a large File with Java EE Batch while the file is uplaoding with JSF 2.2.
Is there a way to get the upload stream ?
If i upload a large file with JSF i alwasy running into following Error's:
java.lang.OutOfMemoryError: Java heap…

Khinsu
- 1,487
- 11
- 27
2
votes
1 answer
java command inside batch file is not getting executed when batch file is called from main method
I am calling a batch file from the main method in the following way:
public static void main(String args[]){
Runtime rt=Runtime.getRuntime();
try {
Process pr=rt.exec("D:\\test1.bat");
pr.waitFor();
}…

ITQuest
- 113
- 1
- 2
- 8
1
vote
1 answer
How to prevent the parallel execution of a Step used in two Jobs in JBeret?
I am using JBeret on Wildfly,
lets say I have Job1 that consists of StepA, StepB, StepC.
Lets say I have Job2 that consists of StepB.
Now, when both Jobs run at the same time, I would like to prevent StepB to be executed in prallel. Meaning Job1…

Thomas
- 620
- 7
- 19
1
vote
1 answer
Stopping a JSR batch application during operation without throwing exception
We have a jsr 352 java batch application that we are wanting to stop the execution early if a condition is met but not throw an exception. The basic layout of our job is as follows:

jworrin
- 825
- 1
- 8
- 20