【问题标题】:Quartz Scheduler: java.lang.IllegalStateException: JobStore is shutdown - aborting retryQuartz Scheduler: java.lang.IllegalStateException: JobStore is shutdown - aborting retry
【发布时间】:2017-01-23 05:06:42
【问题描述】:

我将 JDBC 作业存储与石英一起使用,因为在集群环境中管理作业。以下是我使用mysql的jdbc配置:

    #============================================================================
# Configure Main Scheduler Properties
#============================================================================

org.quartz.scheduler.instanceName: MyScheduler
org.quartz.scheduler.instanceId: instance_one

org.quartz.scheduler.skipUpdateCheck: true


#============================================================================
# Configure ThreadPool
#============================================================================

org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount: 5
org.quartz.threadPool.threadPriority: 5

#============================================================================
# Configure JobStore
#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.dataSource = quartz_cluster
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true


#============================================================================
# Configure Datasources
#============================================================================

org.quartz.dataSource.quartz_cluster.driver = com.mysql.cj.jdbc.Driver
org.quartz.dataSource.quartz_cluster.URL = jdbc:mysql://localhost:3306/quartz_cluster
org.quartz.dataSource.quartz_cluster.user = root
org.quartz.dataSource.quartz_cluster.password = root
org.quartz.dataSource.quartz_cluster.maxConnections = 5

每当我运行具有上述属性的 quarts 时,我的工作就会开始执行,并且在执行 4 次后,我会遇到以下异常:

[ERROR] - [2016-09-15 13:55:03,150] - [org.quartz.core.QuartzSchedulerThread] Runtime error occurred in main trigger firing loop.
java.lang.IllegalStateException: JobStore is shutdown - aborting retry
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retryExecuteInNonManagedTXLock(JobStoreSupport.java:3772)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.releaseAcquiredTrigger(JobStoreSupport.java:2881)
    at org.quartz.core.QuartzSchedulerThread.releaseIfScheduleChangedSignificantly(QuartzSchedulerThread.java:432)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:316)

以下是我的工作详情:

newJob(MyJob.class)
                .withDescription("The myjob job")
                .withIdentity("job-one", "group-one")
                .usingJobData(jobDataMap)
                .requestRecovery(true)
                .build();

以下是我的触发细节:

newTrigger()
            .withIdentity("trigger-one", "group-one")
            .withSchedule(cronSchedule("0/15 * * * * ?")
                    .withMisfireHandlingInstructionFireAndProceed())
            .build();

我没有得到异常中的实际问题?

【问题讨论】:

    标签: java mysql exception quartz-scheduler crontrigger


    【解决方案1】:

    也许你可以尝试重新加载quartz的数据表,我遇到了这个异常,因为我从旧项目中复制了旧数据表。重新加载数据表将解决问题。 您可以从 tar 文件中找到 sql 文件 link description here http://www.quartz-scheduler.org/downloads/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-25
      • 2017-02-02
      • 1970-01-01
      • 1970-01-01
      • 2022-11-21
      相关资源
      最近更新 更多