Questions tagged [java-batch]

84 questions
1
vote
1 answer

JSR-352 Batchlet ejb nullPointerException

I have a problem with a batchlet where I want to use an EJB to populate a list. When I start the project, glassfish flags an error: Caught exception executing step: com.ibm.jbatch.container.exception.BatchContainerRuntimeException: …
Ersch
  • 173
  • 2
  • 15
1
vote
2 answers

Error when running JAVAEE7 Batch on multiple threads

I'm trying to run JAVAEE7 batch on multithread using partition. My batch is simple: read a bunch of random numbers, write out the sum of them using 3 threads. My Job XML
NamNVH
  • 11
  • 2
1
vote
2 answers

JSR 352: Pass Multiple variables using Step Context/Job Context?

I need to pass more that one variable between a Step Listener and a Writer. using StepCtx.setTransientUserData() i can only pass 1 variable. So to pass multiple variables should i create a map/class and pass it or is there a better way?
Fazil Hussain
  • 425
  • 3
  • 16
1
vote
1 answer

JSR 352. Restarting partitions : How to checkpoint the commits?

I have a partitioned job that reads from and writes to a DB. I have a chunking size of 100. If a partition fails and i want the restart to happen from the last commit, do i have to explicitly specify the checkpoint? (in Serializable…
Fazil Hussain
  • 425
  • 3
  • 16
1
vote
2 answers

Partitioned Chunk Step, only first partition runs successfully, the others show ResultSet is closed Error

I am reading a data from a DB2 table and dumping it into a file. I am partitioning the step based on the values in a column. That is if column1 value is "XYZ" it will go in one partition and if column1 value is "ABC" it will go in the other. The…
Fazil Hussain
  • 425
  • 3
  • 16
1
vote
1 answer

Not able to call Maven Java batch using rest service deployed in liberty

https://github.com/WASdev/sample.batch.sleepybatchlet I am trying to run the above git sample. I was able to configure and run a ant build java batch project in liberty. but when it comes to maven project, i was not able to use the rest service to…
1
vote
1 answer

In a (Liberty) Batch chunk step, getting "ResultSet is closed" when scrolling through ResultSet from database query issued earlier in the step

I am reading data from DB2 table and dumping it into a file. I execute my simple select query in the chunk listener's beforeChunk() and use the step context to get it in itemreader. In the chunk i set the checkpoint policy as item and itemcount as…
Fazil Hussain
  • 425
  • 3
  • 16
1
vote
2 answers

Classnotfound when running program from command prompt

When I run my java program from the command prompt, the program does not not run because of a ClassNotFound error. But the class I see is there in a jar file which is on the classpath. That same program when I run from Eclipse works.Not sure as to…
user5053360
  • 279
  • 2
  • 14
1
vote
1 answer

Spring batch in Websphere 8.x

JSR 352 is defined in Java EE7. But in WebSphere 8.x, only Java EE6 is supported. As far as I know, Spring batch 3.x is compatible with JSR 352. My question is, can Spring batch run in WebSphere 8.x (and other app server which supports JEE6 only)?…
0
votes
0 answers

Windows Scheduler not writing application logs in to log file

I have java program with Main method for generating file every 1 hour , and a batch program to start this program. When I start this program using batch program from command prompt, application generating file and LOGS files also updating . All…
0
votes
1 answer

Error using Oracle DB as default job repository in Jakarta batch (JSR352 -Wildfly / jberet)

I'm running a Jakarta 10 application in Wildfly 27.0.1.Final server (thats implement Jakarta batch using Jberet) I want to use a JDBC Job Repository in JBeret. Everything runs okay when I use the default "in-memory" repository or when I use the…
0
votes
1 answer

Filtering after Read in Spring Batch

I currently have a Spring Batch in which FlatFileItemReader reads from a csv file and then based on the values read goes on executing the rest of tasklets and runs the job. I want to make a downstream external api call and based on the response…
0
votes
0 answers

Identify Input Record/Row/Line No. causing the Exception in an Spring Batch process

I have been surfing several websites since few days to find a generic solution to this problem : How to identify which input record is causing the Batch process to fail in exception cases? I have a requirement where I need to log that line no. and…
0
votes
1 answer

Returning previous business day instead of currentDate with fastDateFormat

I currently have the below code utilized for retrieving current date in spring batch. Is there a way to implement a similar solution, but instead, returning the previous business day instead of the currentDate?
Ay123
  • 55
  • 7
0
votes
0 answers

Spring Batch Stops exactly at 2 hours 10 minutes everytime

I have written a spring batch with Reader and Writer (No Processor). All it does is based upon the input records from the reader, loads the data from few source tables to archive tables. I am calling a stored procedure in the writer which loads the…
Saimuga
  • 255
  • 1
  • 5
  • 16