最新版 插件
MainSetup 如下
public class MainSetup implements Setup {
public void init(NutConfig conf) {
Ioc ioc = conf.getIoc();
Dao dao = ioc.get(Dao.class);
System.out.println("+++++++++++++++++" +ioc.has("NutQuartzCronJobFactory"));
conf.getIoc().get(NutQuartzCronJobFactory.class).addPackage("org.nutz.integration.quartz.NutQuartzCronJobFactory");
}
启动log
2016-03-07 16:20:46,953 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:224) DEBUG - Database info --> MYSQL:[MySQL - 5.6.16]
+++++++++++++++++false
2016-03-07 16:20:46,958 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:153) DEBUG - Get 'NutQuartzCronJobFactory'<class org.nutz.integration.quartz.NutQuartzCronJobFactory>
2016-03-07 16:20:46,959 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:173) DEBUG - >> Load definition name=NutQuartzCronJobFactory
2016-03-07 16:20:46,960 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:124) ERROR - Error happend during start serivce!
org.nutz.ioc.IocException: Object 'NutQuartzCronJobFactory' without define! For object [NutQuartzCronJobFactory] - type:[class org.nutz.integration.quartz.NutQuartzCronJobFactory]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:211)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:147)
at com.zyhk.paymentBalance.MainSetup.init(MainSetup.java:25)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
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 com.zyhk.paymentBalance.NutzNutFilter.init(NutzNutFilter.java:22)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.nutz.ioc.ObjectLoadException: Object 'NutQuartzCronJobFactory' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:154)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:176)
... 21 more
2016-03-07 16:20:46,961 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:126) ERROR - try to depose ioc
2016-03-07 16:20:46,963 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:245) INFO - org.nutz.ioc.impl.NutIoc@4838948 is closing. startup date [16-03-07 16:20:46.110]
2016-03-07 16:20:46,963 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'dao' ...
2016-03-07 16:20:46,964 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'conf' ...
2016-03-07 16:20:46,964 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'dataSource' ...
2016-03-07 16:20:46,968 com.alibaba.druid.pool.DruidDataSource.close(DruidDataSource.java:1385) INFO - {dataSource-1} closed
2016-03-07 16:20:46,968 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:249) INFO - org.nutz.ioc.impl.NutIoc@4838948 is deposed. startup date [16-03-07 16:20:46.110]
三月 07, 2016 4:20:46 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: Object 'NutQuartzCronJobFactory' without define! For object [NutQuartzCronJobFactory] - type:[class org.nutz.integration.quartz.NutQuartzCronJobFactory]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:17)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:988)
at org.nutz.lang.Lang.wrapThrow(Lang.java:165)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
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 com.zyhk.paymentBalance.NutzNutFilter.init(NutzNutFilter.java:22)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.nutz.ioc.IocException: Object 'NutQuartzCronJobFactory' without define! For object [NutQuartzCronJobFactory] - type:[class org.nutz.integration.quartz.NutQuartzCronJobFactory]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:211)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:147)
at com.zyhk.paymentBalance.MainSetup.init(MainSetup.java:25)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
... 16 more
Caused by: org.nutz.ioc.ObjectLoadException: Object 'NutQuartzCronJobFactory' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:154)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:176)
... 21 more
三月 07, 2016 4:20:46 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
三月 07, 2016 4:20:46 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/paymentBalance] startup failed due to previous errors
三月 07, 2016 4:20:46 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/paymentBalance] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 07, 2016 4:20:46 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/paymentBalance] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 07, 2016 4:20:46 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/paymentBalance] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
三月 07, 2016 4:20:46 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
三月 07, 2016 4:20:46 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
三月 07, 2016 4:20:46 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 3917 ms