For security purpose I have to migrate my H2 library from 1.4.200 to 2.1.214 in my Spring Batch application
In 1.4.200 version, all my Junit test are OK but with new version, start of the application failed :
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "BATCH_JOB_INSTANCE" not found (this database is empty); SQL statement:
SELECT JOB_INSTANCE_ID, JOB_NAME from BATCH_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ? [42104-214]
I have juste change H2 version in my pom.xml
Spring Batch application use Spring Boot 2.1.11.RELEASE dependencies.
Do you know why this tables aren't find ?
spring:
application:
name: myBatch
cache:
type: simple
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:h2:mem:myBatch;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
name:
username:
password:
hikari:
auto-commit: false
By Spring Batch, it's native
: Spring Batch does not create tables, you probably mean Spring Boot. According to the error, the table does not exist, meaning the table is not created as you might think. Please share a minimal example that reproduces the issue to be able to help you efficiently.