我試圖使用石英插件grails(http://grails.org/plugin/quartz)啓用作業持久性,但每次嘗試創建新作業時都無法找到表。它看起來像插件不創建表。沒有爲Grails 2.3.11創建石英插件表
我在mysql和我的grails版本中使用的數據庫是2.3.11。我試圖對本博客中使用的配置進行鏡像(http://blog.robinpercy.com/2012/11/06/grails-clustered-quartz-configs-by-environment/),但表格未創建。
這裏是我的石英配置:
jdbcProps = {
scheduler.instanceName = "quartz"
scheduler.instanceId = "AUTO"
threadPool.class = "org.quartz.simpl.SimpleThreadPool"
threadPool.threadCount = 3
threadPool.threadPriority = 5
jobStore.misfireThreshold = 60000
jobStore.class = "org.quartz.impl.jdbcjobstore.JobStoreTX"
jobStore.driverDelegateClass = "org.quartz.impl.jdbcjobstore.MSSQLDelegate"
jobStore.useProperties = false
jobStore.tablePrefix = "qrtz_"
jobStore.isClustered = true
jobStore.clusterCheckinInterval = 5000
plugin.shutdownhook.class = "org.quartz.plugins.management.ShutdownHookPlugin"
plugin.shutdownhook.cleanShutdown = true
}
environments {
development {
quartz {
autoStartup = true
jdbcStore = true
waitForJobsToCompleteOnShutdown = true
props(jdbcProps)
}
}
}
石英可以找到自己DataSource.groovy文件中指定的數據庫,但它無法找到它所需要的表。
dataSource {
pooled = true
driverClassName = "com.mysql.jdbc.Driver"
username = "root"
password = "root"
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
url = "jdbc:mysql://localhost:3306/appDatabase?autoReconnect=true"
properties {
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
}
這裏是例外
An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: Table 'appDatabase.qrtz_TRIGGERS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'appDatabase.qrtz_TRIGGERS' doesn't exist
我在這裏失去了一些東西?我需要手動創建表還是有一些配置錯誤?