Skip to content
Advertisement

Tag: spring-batch

Spring batch job runs automatically

I’m using a spring batch to read a CSV file and write it to the DB, using the controller trigger. On starting the application, before I hit from the browser url, I see the print statements from my reader, on the startup. Although it doesn’t print it for my processor or writer, which are in separate classes which I have

Spring SFTP : Unable to rename .writing file

I am using Spring SFTP integration to transfer the file and many time I got this error. It seems two threads are trying to transfer same file and conflict with each other 2020-08-03 08:31:55,766 INF [task-scheduler-8 ] o.s.i.ftp.session.FtpSession – File has been successfully transferred from: ./abc.ext.200803 2020-08-03 08:31:55,849 INF [task-scheduler-7 ] o.s.i.ftp.session.FtpSession – File has been successfully transferred from: ./abc.ext.200803

How do I get a SpringBatch Integration test to load my application properties?

I have the following Spring Batch test in my src/test/java: I define my test/resources/application-local-test.yml: and in my main application, a SpringBatch Configuration: When I try to run the integration test my application-local-test.yml is not getting picked up: What am I doing wrong? Answer I ran into the same situation that I cannot load the application.yaml while using @SpringBatchTest to write

How to write this method in a generic way in java

Currently, I have this method implemented for five different class to configure FlatFileReader for five different text files and load into DB table. I would like to know is there a way to implement this method in a common place So that my each file will call this method to configure my reader to read their corresponding files.. Every file

Invalid column name exception – JdbcPagingItemReader query with alias

Spring batch step fails when JdbcPagingItemReader query has a join and alias. It works fine when I remove the join and just do a simple query from employee table. Below is the code snippet that fails. Did anyone encounter such an issue ? Any help would be appreciated. spring-batch-core-4.0.1.RELEASE spring-boot-2.0.0.RELEASE Caused by: java.sql.SQLException: Invalid column name at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3965) ~[ojdbc6-11.2.0.3.jar:12.1.0.1.0] at

Spring batch filtering data inside item reader

I’m writing a batch that reads log files which should take many types (format of log log file ) then I want to read every file based on some characters inside log files for example 15:31:44,437 INFO <NioProcessor-32> Send to <SLE- 15:31:44,437 INFO <NioProcessor-32> [{2704=5, 604=1, {0=023pdu88mW00007z}] 15:31:44,437 DEBUG <NioProcessor-32> SCRecord 2944 In such a log file I want to

Advertisement