NutzCN Logo
问答 nutzbook集成quartz时重启创建bean失败了
发布于 2644天前 作者 qq_2f4e88b8 1543 次浏览 复制 上一个帖子 下一个帖子
标签:

跟着nutzbook做下来,bean的初始化失败了。

[ERROR] 22:35:51.674 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:125) - Error happend during start serivce!
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.bit.nutzbook.MainSetup.init(MainSetup.java:38)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4660)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5298)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
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)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.nutz.lang.born.MethodBorning.born(MethodBorning.java:17)
	... 28 more
[ERROR] 22:35:51.682 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:127) - try to depose ioc
[INFO ] 22:35:51.694 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:255) - org.nutz.ioc.impl.NutIoc@22512166 is closing. startup date [17-09-26 22:35:49.473]
[DEBUG] 22:35:51.695 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:108) - Depose object 'conf' ...
[DEBUG] 22:35:51.695 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:108) - Depose object 'dao' ...
[DEBUG] 22:35:51.695 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:113) - Depose object 'dataSource' ...
[INFO ] 22:35:51.706 com.alibaba.druid.pool.DruidDataSource.close(DruidDataSource.java:1444) - {dataSource-1} closed

pom文件如下:

<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutz</artifactId>
			<version>1.r.60</version>
		</dependency>
	<!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>2.3.0</version>
		</dependency>
<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutz-integration-quartz</artifactId>
			<version>1.r.60.r2</version>
		</dependency>

环境如下:

DEBUG] 22:35:49.254 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:59) - Loading by class org.nutz.mvc.impl.NutLoading
[INFO ] 22:35:49.259 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) - Nutz Version : 1.r.60 
[INFO ] 22:35:49.259 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) - Nutz.Mvc[nutz] is initializing ...
[DEBUG] 22:35:49.260 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) - Web Container Information:
[DEBUG] 22:35:49.263 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) -  - Default Charset : UTF-8
[DEBUG] 22:35:49.263 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) -  - Current . path  : C:\soft\eclipse-jee-mars-2-win32-x86_64\eclipse\.
[DEBUG] 22:35:49.263 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) -  - Java Version    : 1.8.0_91
[DEBUG] 22:35:49.263 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) -  - File separator  : \
[DEBUG] 22:35:49.263 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) -  - Timezone        : Asia/Shanghai
[DEBUG] 22:35:49.264 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) -  - OS              : Windows 7 amd64
[DEBUG] 22:35:49.264 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) -  - ServerInfo      : Apache Tomcat/8.0.35
[DEBUG] 22:35:49.264 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) -  - Servlet API     : 3.1
[DEBUG] 22:35:49.264 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) -  - ContextPath     : /nutzbook
[DEBUG] 22:35:49.266 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) -  - context.tempdir : G:\soft\apache-tomcat-8.0.35\work\Catalina\localhost\nutzbook
[DEBUG] 22:35:49.267 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) -  - MainModule      : com.bit.nutzbook.MainModule
1 回复
添加回复
请先登陆
回到顶部