Quartz Error: qrtz_locks doesn’t exist [How to Solve]

Problem Description: qrtz_locks doesn’t exist

Quartz supports data persistence, so if autowire is assembled automatically, create org springframework. scheduling. quartz. The schedulerfactorybean will automatically inject the database datasource into the database, so that quartz will report an error because it thinks it will persist the data.

Solution: whether spring’s default autowire is set to “autodetect” or “byname”, a * QRTZ_LOCKS’ doesn’t exist

Method 1: do not use the default autowire attribute;

Method 2: set autowire = “no” to schedulerfactorybean without changing the spring default autowire attribute.

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" autowire="no">
    <property name="triggers">
            <ref bean="simpleTriggerBean" />

Normally, it will display org quartz.core.Quartzscheduler runs locally, uses memory, and does not support persistence.

Similar Posts: