我使用quartz来安排我的工作,当我使用RAM JOB Store时,调度程序启动并成功触发但是当我使用JDBC存储时它无法启动。你能指导一下,我已经放置了以下文物,
# Default Properties file for use by StdSchedulerFactory
# to create a Quartz Scheduler Instance, if a different
# properties file is not explicitly specified.
#
org.quartz.scheduler.instanceName: DefaultQuartzScheduler
org.quartz.scheduler.rmi.export: false
org.quartz.scheduler.rmi.proxy: false
org.quartz.scheduler.wrapJobExecutionInUserTransaction: false
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount: 2
org.quartz.threadPool.threadPriority: 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true
org.quartz.jobStore.misfireThreshold: 60000
#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = myDS
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.dataSource.myDS.driver = org.hsqldb.jdbc.JDBCDriver
org.quartz.dataSource.myDS.URL = jdbc:hsqldb:file:x\\myds
org.quartz.dataSource.myDS.user = SA
org.quartz.dataSource.myDS.password = sa
org.quartz.dataSource.myDS.maxConnections = 30
这些是我的日志...
2014-01-17 11:36:42 INFO MLog:80 - MLog clients using log4j logging.
2014-01-17 11:36:42 INFO C3P0Registry:204 - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
2014-01-17 11:36:42 INFO StdSchedulerFactory:1184 - Using default implementation for ThreadExecutor
2014-01-17 11:36:42 INFO SimpleThreadPool:268 - Job execution threads will use class loader of thread: main
2014-01-17 11:36:42 INFO SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2014-01-17 11:36:42 INFO QuartzScheduler:240 - Quartz Scheduler v.2.2.1 created.
2014-01-17 11:36:42 INFO JobStoreTX:670 - Using thread monitor-based data access locking (synchronization).
2014-01-17 11:36:42 INFO JobStoreTX:59 - JobStoreTX initialized.
2014-01-17 11:36:42 INFO QuartzScheduler:305 - Scheduler meta-data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 2 threads.
Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreTX' - which supports persistence. and is not clustered.
2014-01-17 11:36:42 INFO StdSchedulerFactory:1339 - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
2014-01-17 11:36:42 INFO StdSchedulerFactory:1343 - Quartz scheduler version: 2.2.1
2014-01-17 11:36:42 INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2yhpp38z182altw1uxr4l9|6df6f81b, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.hsqldb.jdbc.JDBCDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2yhpp38z182altw1uxr4l9|6df6f81b, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:hsqldb:file:x\database\myds, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 120, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
目前数据库表是空的......
您的建议需要......
答案 0 :(得分:0)
好的,我认为这不是一个错误。我的项目中有相同的LOG信息(未启动)但是当我检查我的表时,我能够看到我的工作和触发器。尝试手动添加数据库表并在项目中安排作业。在数据库中看到之后。