When running Converter for a Custom Scheduler we are getting the following error in the jaws.log.
Caused by: java.sql.BatchUpdateException: Cannot insert duplicate key row in object 'dbo.JawsJob' with unique index 'XAK1JawsJob'. The duplicate key value is (<JobName>, <JobID>, 17219, <NULL>).
This can occur if you have deleted a job and try to add it back before the Job Run Maintenance threshold is hit, which would completely remove the job. This could also occur if your maintenance process is not working properly.
The job will still be in the JawsJob with a deletedTime set for the job.
When the job is in this state it will not get loaded into memory, but is still in the database.
Being that it is not in memory, when the converter runs and tries to add the same job back, it tries to process it as a new job and fails due to the database constraint.
If the device were in memory it would get re-added as it would detect the job existed and was being added back.
Release : 5.8.6
Component : AUTOMIC AUTOMATION INTELLIGENCE ENGINE
The work around for this scenario is to temporarily disable the Database Maintenance from the config tool like in the screenshot below.
Then run the "Download Now" option for the scheduler that has the error from the Admin->Schedulers section of the AAI client and verify you no longer see the error.
Then enable the Maintenance again from the configuration tool as you may run into errors with jobs on other schedulers with it disabled.