Reputation: 41
Currently I'm using the SpringBoot ( 2.3.3 Version ) and Batch ( 4.2.4 Version ) and spring-cloud-starter-tsk ( 2.2.3 Version ) with Single Datasource ( oracle ). My BatchConfiguration extends the DefaultBatchConfigurer and made setDataSource. Now I'm trying to connect the Oracle DB and read records & generate the flatfile.
I'm getting below error and strange thing is I'm able to get the datasource and SEQUENCE (TASK_SEQ ) is available in DB.
Please find my other files below
Upvotes: 0
Views: 1086
Reputation: 31590
In your batch configuration, you are using the MapJobRepositoryFactoryBean
which creates a Map-based JobRepository in-memory. You need to remove this and use the JDBC based job repository pointing to your Oracle datasource as described in the reference documentation: Configuring a JobRepository.
You need to make sure that Spring Batch meta-data tables are created in your Oracle database before running your job.
The same configuration should be done for Spring Cloud Task as well.
Upvotes: 2