I'm new to Quartz scheduler and I'm using it with spring ... When I tried to run the XML file that contains Quartz configuration I got an exception stating that:
Failure obtaining db row lock: No row exists in table QRTZ_LOCKS for lock named:
TRIGGER_ACCESS
I found that the table QRTZ_LOCKS contains two fields: SCHED_NAME and LOCK_NAME and that I should run the following statements in my database:
INSERT INTO QRTZ_LOCKS values('my sched_name', 'TRIGGER_ACCESS');
INSERT INTO QRTZ_LOCKS values('my sched_name','JOB_ACCESS');
INSERT INTO QRTZ_LOCKS values('my sched_name','CALENDAR_ACCESS');
INSERT INTO QRTZ_LOCKS values('my sched_name','STATE_ACCESS');
INSERT INTO QRTZ_LOCKS values('my sched_name','MISFIRE_ACCESS');
but I don't have a clue what is my sched_name ??
Any idea ??
You just need to run
INSERT INTO QRTZ_LOCKS values('TRIGGER_ACCESS');
INSERT INTO QRTZ_LOCKS values('JOB_ACCESS');
INSERT INTO QRTZ_LOCKS values('CALENDAR_ACCESS');
INSERT INTO QRTZ_LOCKS values('STATE_ACCESS');
INSERT INTO QRTZ_LOCKS values('MISFIRE_ACCESS');
That worked for me actually. Stopped the error at least.
That is most likely because you got the table scripts from a newer version of Quartz then you are applying on your application.
If you are using Spring, then you must have Quartz 1.8.x.
This is where you can find version 1.8.6
Note: Inside that tar.gz file there is another file without extension. It is a zip file which contains a folder named doc. In there you can find a script for several database engines.
No manual modifications on data should be necessary.
*my_sched_name* can be retrieved from the table qrtz_job_details
(sched_name).
You must have an issue with your quartz configuration/deployement because usually you do not have to insert/update those tables manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With