5

I am using JDBC Job store with quartz because manage job in cluster enviorment. Following is my jdbc configuration using mysql:

    #============================================================================
# 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

Whenever i am running the quarts with above properties, my job start's executing and after execute 4 times, i am getting following exception :

[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)

Following is my job detail:

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

Following is my trigger detail:

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

I am not getting what actual problem in exception ?

Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126

1 Answers1

0

may be you can try reload the data tables of quartz,I had got this exception because I copy the old data tables from old project.reload the data tables will solve the problem. you can find the sql file from tar file link description here http://www.quartz-scheduler.org/downloads/

Renats Stozkovs
  • 2,549
  • 10
  • 22
  • 26
paul
  • 65
  • 10