使用quartz jdbcstore得不到SQLException表

时间:2013-05-03 12:48:13

标签: java mysql quartz-scheduler

我使用jdbcstore实现了Quartz Scheduler。我得到了像qrtz_TRIGGERS这样的异常。

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

但实际上我的数据库中有表,表名是qrtz_triggers。表名都是小写字母。那么如何解决这个问题以及我的石英属性

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

3 个答案:

答案 0 :(得分:1)

尝试将表重命名为qrtz_TRIGGERS?看起来这就是调度程序正在寻找的东西。

答案 1 :(得分:0)

Probably you db is case sensitive, you should update your configuration file my.cnf accordingly...

Below link for a help page For making your mysaql on linux machine case insensitive: https://dba.stackexchange.com/questions/59407/how-to-make-mysql-table-name-case-insensitive-in-ubuntu

答案 2 :(得分:0)

一般:

数据库名称和表名称在Windows中不区分大小写,在大多数Unix版本中也不区分大小写。因此,qrtz_TRIGGERS和qrtz_triggers在您的情况下是不同的。

快速浏览: Are table names in MySQL case sensitive?