Java SimpleThreadPool的Quartz ClassNotFoundException

Java SimpleThreadPool的Quartz ClassNotFoundException,java,java-8,quartz-scheduler,guice,dropwizard,Java,Java 8,Quartz Scheduler,Guice,Dropwizard,我正在尝试配置仅在一个节点()上运行的quartz调度程序。每当我设置quartz线程池时,它都会告诉我无法找到SimpleThreadPool,即使它是通过spinscale/dropwizard作业加载到我的项目中的。加载的版本为quartz-2.2.3 我正在使用将quartz集成到dropwizard项目中。我正在使用dropwizard 1.0.5、dropwizard guicey 4.0.1()、spinscale quartz实现3.0.0 我通过以下示例连接了依赖项注入: 我已

我正在尝试配置仅在一个节点()上运行的quartz调度程序。每当我设置quartz线程池时,它都会告诉我无法找到
SimpleThreadPool
,即使它是通过
spinscale/dropwizard作业加载到我的项目中的。加载的版本为
quartz-2.2.3

我正在使用将quartz集成到dropwizard项目中。我正在使用dropwizard 1.0.5、dropwizard guicey 4.0.1()、spinscale quartz实现3.0.0

我通过以下示例连接了依赖项注入:

我已经将以下文件添加到我的项目中
quartz.properties

org.quartz.scheduler.instanceName: "scheduler"
org.quartz.scheduler.instanceId: "AUTO"
org.quartz.scheduler.skipUpdateCheck: "true"
org.quartz.threadPool.class: "org.quartz.simpl.SimpleThreadPool"
org.quartz.threadPool.threadCount: "10"
org.quartz.threadPool.threadPriority: "5"
org.quartz.jobStore.misfireThreshold: "60000"
org.quartz.jobStore.class: "org.quartz.impl.jdbcjobstore.JobStoreTX"
org.quartz.jobStore.driverDelegateClass: "org.quartz.impl.jdbcjobstore.StdJDBCDelegate"
org.quartz.jobStore.useProperties: "false"
org.quartz.jobStore.dataSource: "myDS"
org.quartz.jobStore.tablePrefix: "QRTZ_"
org.quartz.jobStore.isClustered: "true"
org.quartz.dataSource.myDS.driver: "org.postgresql.Driver"
org.quartz.dataSource.myDS.URL: "jdbc:mysql://localhost:3306/quartz"
org.quartz.dataSource.myDS.user: user
org.quartz.dataSource.myDS.password: pass
org.quartz.dataSource.myDS.maxConnections: "5"
org.quartz.dataSource.myDS.validationQuery: "select 1"
这是我看到的一个例外

ERROR [2018-03-12 04:38:29,755] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down
! java.lang.ClassNotFoundException: "org.quartz.simpl.SimpleThreadPool"
! at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
! at org.quartz.simpl.InitThreadContextClassLoadHelper.loadClass(InitThreadContextClassLoadHelper.java:72)
! at org.quartz.simpl.CascadingClassLoadHelper.loadClass(CascadingClassLoadHelper.java:114)
! at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:822)
! ... 17 common frames omitted
! Causing: org.quartz.SchedulerException: ThreadPool class '"org.quartz.simpl.SimpleThreadPool"' could not be instantiated.
! at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:824)
! at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1525)
! at org.quartz.impl.StdSchedulerFactory.getDefaultScheduler(StdSchedulerFactory.java:1541)
! at de.spinscale.dropwizard.jobs.JobManager.start(JobManager.java:50)
! at io.dropwizard.lifecycle.JettyManaged.doStart(JettyManaged.java:27)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
! at org.eclipse.jetty.server.Server.start(Server.java:411)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
! at org.eclipse.jetty.server.Server.doStart(Server.java:378)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
! at io.dropwizard.cli.Cli.run(Cli.java:75)
! at io.dropwizard.Application.run(Application.java:79)
使用yaml格式,但是,当您使用纯属性格式时,不应该将值括在引号中

因此,在您的例子中,它确实找不到类
“org.quartz.siml.SimpleThreadPool”
,因为有引号

我建议对quartz配置使用主dropwizard配置(yaml)(正如库文档所建议的那样),以便将所有配置保持在一个位置