0

I am using Spring Batch and I am aware it can do an automatic creation of the meta tables. I don't need them and I tried : spring.batch.initializer.enabled= false or spring.batch.initialize-schema: never and I always have this error:

Caused by: org.postgresql.util.PSQLException: ERROR: relation "batch_job_instance" does not exist 
 Position : 39
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114) ~[postgresql-42.2.16.jar:42.2.16]
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[HikariCP-3.4.5.jar:na]
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar:na]
    at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:678) ~[spring-jdbc-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617) ~[spring-jdbc-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    ... 39 common frames omitted
halfer
  • 19,824
  • 17
  • 99
  • 186
help me code
  • 149
  • 2
  • 13

1 Answers1

1

I am using Spring Batch and I am aware it can do an automatic creation of the meta tables. I don't need them.

Spring Batch does not automatically create tables, it is Spring Boot that does it if you instruct it to do so.

[To turn them off] I tried : spring.batch.initializer.enabled= false or spring.batch.initialize-schema: never and I always have this error

Your properties are both incorrect. The property name is spring.batch.jdbc.initialize-schema. Please check the reference documentation.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mahmoud Ben Hassine
  • 28,519
  • 3
  • 32
  • 50