Quartz没有采用自定义属性

时间:2014-05-16 17:34:02

标签: java jsp quartz-scheduler

我是quartz的新手,我尝试使用netbeans IDE在apache-tomcat中配置它。

我按照本文中的步骤进行了操作:

http://smileybits.blogspot.in/2010/05/using-quartz.html

我在web-inf / classes中创建了quartz.properties。  看起来像这样

   # quartz configuration

 # jobstore
 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX

 org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

 # datasource
 org.quartz.jobStore.dataSource =MyDS 
#jdbc:mysql://localhost:3306/dcis_assessment"
org.quartz.dataSource.MyDS.driver =com.mysql.jdbc.Driver
org.quartz.dataSource.MyDS.URL =jdbc:mysql://127.0.0.1/PhD
org.quartz.dataSource.MyDS.user =root
org.quartz.dataSource.MyDS.password =ratnam
#org.quartz.dataSource.MyDS.validationQuery=select 1

# thread pool
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5

# disable quartz version update check
org.quartz.scheduler.skipUpdateCheck=true

不幸的是,石英没有从这个文件中获取属性,当我查看日志时,我可以看到以下几行。

    Quartz scheduler 'QuartzScheduler' initialized from default resource file in      Quartz  package: 'quartz.properties'

   [INFO] 16 May 2014 22:24:24.888 pool-2-thread-1 [org.quartz.impl.StdSchedulerFactory]
   Quartz scheduler version: 2.1.7

   [WARN] 16 May 2014 22:24:54.166     com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1     [com.mchange.v2.resourcepool.BasicResourcePool]
   com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@eddac6 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 

  java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

0 个答案:

没有答案