Hey all,
I have some issues with my task scheduler. Whenever I open the screen I get the following Exception:
Next to that I get the same exception every time I try to add an task.
Internal Exception: java.sql.SQLSyntaxErrorException: unexpected token: AS required: ( in statement [SELECT LIMIT ? ? ID AS a1, IS_ACTIVE AS a2, BEAN_NAME AS a3, CLASS_NAME AS a4, CRON AS a5, DEFINED_BY AS a6, DELETE_TS AS a7, DELETED_BY AS a8, DESCRIPTION AS a9, LAST_START_SERVER AS a10, LAST_START_TIME AS a11, LOG_FINISH AS a12, LOG_START AS a13, METHOD_NAME AS a14, METHOD_PARAMS AS a15, PERIOD AS a16, PERMITTED_SERVERS AS a17, SCHEDULING_TYPE AS a18, SCRIPT_NAME AS a19, IS_SINGLETON AS a20, START_DATE AS a21, START_DELAY AS a22, TIME_FRAME AS a23, TIMEOUT AS a24, USER_NAME AS a25 FROM SYS_SCHEDULED_TASK WHERE (DELETE_TS IS NULL) ORDER BY BEAN_NAME, METHOD_NAME]
Error Code: -5581
It might have been caused by wrongly removing/adding beans but I am not 100% sure about that.
I set the task scheduling property in my app properties to true as well but it did not change anything.
On further inspection of the App log file I found the same internal exception, after that I found the following few lines:
2019-04-11 11:49:22.660 INFO [cuba_core_scheduler-3/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:23.689 INFO [cuba_core_scheduler-3/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:24.662 INFO [cuba_core_scheduler-2/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:25.693 INFO [cuba_core_scheduler-2/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:26.662 INFO [cuba_core_scheduler-5/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:27.689 INFO [cuba_core_scheduler-5/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:28.693 INFO [cuba_core_scheduler-5/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
2019-04-11 11:49:29.689 INFO [cuba_core_scheduler-6/app-core/admin] com.haulmont.cuba.core.app.scheduling.DbBasedCoordinator - Unable to acquire lock on tasks
It seems like the tasks cannot be saved because the table cannot be locked, how can I possibly solve this?
As I said it might have been caused by Beans or Services since I was adding/removing these before. But I am not sure if the application was doing this as well before I created any beans or services.
I tried going back to previous versions through Git. And the same error occurred in all versions, but I am not 100% sure that all the changes from adding beans and services were version controlled.
Log files:
perfstat-ui.log (2.8 KB)
localhost_access_log.2019-04-11.txt (1.2 KB)
catalina.2019-04-11.log (3.8 KB)
localhost.2019-04-11.log (1.3 KB)
perfstat.log (1.6 KB)
app.log (44.5 KB)