I googled a lot and trying to follow this doc https://docs.spring.io/spring-batch/docs/5.0.1/reference/html/whatsnew.html#whatsNew
But not able to find a way to disable spring batch meta data.
Even I tried not to use @EnableBatchProcessing but still getting this err:
for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_EXECUTION_ID, PARAMETER_NAME, PARAMETER_TYPE, PARAMETER_VALUE, IDENTIFYING from BATCH_JOB_EXECUTION_PARAMS where JOB_EXECUTION_ID = ?]] with root cause java.sql.SQLSyntaxErrorException: Unknown column 'PARAMETER_NAME' in 'field list'
If there is any code reference or tutorial please suggest.
You can't "disable" metadata. A Job
always requires a JobRepository
to report its meta-data to (unless you implement the Job
interface yourself, which is not the goal in the first place if you decide to use Spring Batch).
Now starting from v5, Spring Batch only provides a JDBC based implementation of the JobRepository
. The in-memory Map-based implementation was removed. Therefore, you have to use the JDBC implementation (which is the default and which requires a JDBC datasource), or provide a custom implementation of JobRepository
yourself.
In the case of using the default JDBC based JobRepository
, the datasource could be an in-memory one (like H2, HSQLDB, etc).