5

Previously i was using batch spring-batch-core-2.2.0 and spring-batch-infrastructure-2.2.0 but now i want to use spring-batch-3.0.0 , so i replaced the jars and used spring-batch-core-3.0.0 , spring-batch-infrastructure-3.0.0, spring-retry-1.0.2.RELEASE and javax.batch-api-1.0.

But now i m getting the error::

"bad SQL grammar [INSERT into BATCH_JOB_EXECUTION(JOB_EXECUTION_ID, JOB_INSTANCE_ID, START_TIME, END_TIME, STATUS, EXIT_CODE, EXIT_MESSAGE, VERSION, CREATE_TIME, LAST_UPDATED, JOB_CONFIGURATION_LOCATION) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'JOB_CONFIGURATION_LOCATION' in 'field list'"

I do not want to delete previous data which is generated by spring batch.

JavaBeigner
  • 608
  • 9
  • 28
Sandip patil
  • 123
  • 2
  • 14

1 Answers1

3

The database tables used internally by spring batch have changed.

Check out the answer to this question: Is there a Spring Batch 3 Upgrade Script for MySQL?

This provides the DDL for upgrading the tables in mysql. Depending on your database you might have to make some minor changes.

Community
  • 1
  • 1
Thomas Stets
  • 3,015
  • 4
  • 17
  • 29