Sunday, September 29, 2019

java - Got SQLException table doesn't exist using quartz jdbcstore



Iam implementing Quartz Scheduler using jdbcstore.I got exception like qrtz_TRIGGERS is not available.




2013-05-03 07:58:38,211 -  - DEBUG, [main], com.mchange.v2.c3p0.impl.DefaultConnectionTester, Testing a Connection in response to an Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'myData.qrtz_TRIGGERS' doesn't exist


But actually table is available in my database and the table name is qrtz_triggers.the table name is all are small letters. So How to resolve this issue and my quartz properties below



org.quartz.scheduler.instanceName = APP1_SCHEDULER
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 4
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true


#specify the jobstore used
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false

#The datasource for the jobstore that is to be used
org.quartz.jobStore.dataSource = myDS

#quartz table prefixes in the database

org.quartz.jobStore.tablePrefix = qrtz_
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.isClustered = false

#The details of the datasource specified previously
org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/myData
org.quartz.dataSource.myDS.user = root
org.quartz.dataSource.myDS.password = root
org.quartz.dataSource.myDS.maxConnections = 20


Answer



Try renaming your table to qrtz_TRIGGERS? It looks like this is what the scheduler is looking for.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...