Announcement Announcement Module
Collapse
No announcement yet.
Table 'batch_job_instance' already exists error when trying to execute Spring Batch Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Table 'batch_job_instance' already exists error when trying to execute Spring Batch

    Hello everyone,
    I created a new Spring batch job using database functionality using MySql and it works fine the very first time it runs. I see that Spring batch creates the metadata tables and is able to pull data from my product table for use with the batch process. If I run the batch job again, I am getting an error that Table 'batch_job_instance' already exists. So Batch is trying to recreate the metadata tables, even though they have already been created by the previous job. I've been looking around, and I haven't figured out how to tell Spring Batch that the metadata tables have already been created.

    Any help would be greatly appreciated...thanks!

  • #2
    You probably have the DataSourceInitializer still configured in your launch-context.xml. This will attempt to execute the provided script ever time it's bootstrapped. Remove it and you should be fine.

    Comment

    Working...
    X