NutzCN Logo
问答 使用nutz加入quartz的时候 报错
发布于 10天前 作者 qq_cba58631 36 次浏览 复制 上一个帖子 下一个帖子
标签:
Caused by: org.nutz.ioc.IocException: [nutQuartzCronJobFactory, scheduler] # FAIL to create Ioc Bean name=[scheduler]
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
	at com.nutz.test.MainSetup.init(MainSetup.java:34)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	... 15 more
Caused by: org.nutz.lang.born.BorningException: Fail to born 'org.quartz.impl.StdSchedulerFactory'
 by args: [] because:
org.quartz.SchedulerException: ThreadPool class not specified. 
	at org.nutz.lang.born.MethodBorning.born(MethodBorning.java:20)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:114)
	... 26 more
Caused by: org.quartz.SchedulerException: ThreadPool class not specified. 
	at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:759)
	at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1371)
	at org.quartz.impl.StdSchedulerFactory.getDefaultScheduler(StdSchedulerFactory.java:1387)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)


demo的配置是org.quartz.scheduler.instanceName = NutzbookScheduler
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
#org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool 
org.quartz.scheduler.skipUpdateCheck=true

我加了一个org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool  这个就好了 是为什么啊
2 回复

quartz版本差异

添加回复
请先登陆
回到顶部