RUNTIME_SCHEDULED_TASKS_INX duplicate key exceptions

Post any questions regarding Installing or Upgrading Ebase, including problems starting up the Ebase Xi Server or Designer

Moderators: Jon, Steve, Ian, Dave

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

RUNTIME_SCHEDULED_TASKS_INX duplicate key exceptions

#1

Postby dvanhussel » Fri Aug 12, 2016 9:05 am

Hi,

The log of my local development server in the Ebase Designer throws this exception:

Code: Select all

vr aug 12 10:44:53: ERROR Error inserting runtime scheduled task runtime record
vr aug 12 10:44:53: ERROR The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'RUNTIME_SCHEDULED_TASKS_INX' defined on 'RUNTIME_SCHEDULED_TASKS'.
vr aug 12 10:44:53: ERROR Scheduler error:  error checking for scheduled tasks to be run
com.ebasetech.ufs.utility.PersistenceException: Error inserting runtime scheduled task runtime record, The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'RUNTIME_SCHEDULED_TASKS_INX' defined on 'RUNTIME_SCHEDULED_TASKS'.
	at com.ebasetech.ufs.runtime.scheduler.ScheduledTaskRuntimeRepository.insertRuntimeTaskToRepository(ScheduledTaskRuntimeRepository.java:134)
	at com.ebasetech.ufs.runtime.scheduler.RuntimeScheduledTask.insertRuntimeTasks(RuntimeScheduledTask.java:348)
	at com.ebasetech.ufs.runtime.scheduler.RuntimeScheduledTask.applyScheduledTaskChangesToDatabase(RuntimeScheduledTask.java:201)
	at com.ebasetech.ufs.runtime.scheduler.Scheduler.detectScheduledTaskChanges(Scheduler.java:148)
	at com.ebasetech.ufs.runtime.scheduler.Scheduler.dispatcher(Scheduler.java:60)
	at com.ebasetech.ufs.runtime.scheduler.Scheduler.run(Scheduler.java:116)
vr aug 12 10:44:53: INFO Transaction rolled back
Is there a way how I can reset or update this ID?

Regards,

David
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Fri Aug 12, 2016 10:05 am

Each scheduled task has a unique runtime id which is system generated. This error message indicates that you have two tasks with the same id. Do you know how you arrived at this situation? Possibly, copying/pasting workspace directories containing scheduled tasks? The solution is to identify the scheduled tasks in the workspace with the duplicate ids and then either delete one of them (best solution) or change the runtime id (it's probably safe to just change one character to make it unique). You can see/change these ids by opening the workspace xxx.eb files with notepad or any other editor. You shouldn't need to restart anything.
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#3

Postby dvanhussel » Fri Aug 12, 2016 3:09 pm

Hi Jon,

Thanks. There where indeed 2 (different) scheduled tasks with the same runtimeTaskIdentifier

I'm not sure what happened here as these taks where created by a colegue who is on vacation at the moment. But I guess a copy was made and only the name and the form to run where changed, as the creation date-time is also exactly the same in both tasks.

I changed one character of the identifier. This fixed the problem.

Regards
0 x

vin@haarlem
Ebase User
Posts: 8
Joined: Wed Aug 14, 2013 9:18 am

#4

Postby vin@haarlem » Wed Jun 28, 2017 8:51 am

Hi Jon,

I got the same error on my local machine but no duplicate runtimeTaskIdentifiers. I searched the Workspace directory recursively for "<runtimeTaskIdentifier>" and found 8 files, but all are different. Is there another issue causing the error?

Thanks, Vincent
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#5

Postby Steve » Fri Jun 30, 2017 10:44 am

Hi Vin,

You need to open the files and check the id on the scheduledTask XML node.

<scheduledTask id="myId"...>

See if you have any duplicate IDs in here. If you do then you need to rename the id to the name of the file (you said the filenames were all unique)

Steve
0 x


Who is online

Users browsing this forum: No registered users and 5 guests