NutzCN Logo
问答 启动时候找不到[nutQuartzJobFactory]
发布于 3168天前 作者 qq_6c186ef5 2276 次浏览 复制 上一个帖子 下一个帖子
标签:

2016-04-21 09:37:10,621 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:124) ERROR - Error happend during start serivce!
org.nutz.ioc.IocException: Object 'nutQuartzJobFactory' without define! For object [nutQuartzJobFactory] - type:[] FAIL to create Ioc Bean name=[scheduler]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:147)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:204)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:148)
at com.risun.nutz.MainSetup.init(MainSetup.java:57)
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.(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.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.nutz.ioc.IocException: Object 'nutQuartzJobFactory' without define! For object [nutQuartzJobFactory] - type:[]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:211)
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)
... 36 more
Caused by: org.nutz.ioc.ObjectLoadException: Object 'nutQuartzJobFactory' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:154)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:176)
... 40 more
2016-04-21 09:37:10,624 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:126) ERROR - try to depose ioc
2016-04-21 09:37:10,626 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:245) INFO - org.nutz.ioc.impl.NutIoc@1948811 is closing. startup date [16-04-21 09:37:09.549]
2016-04-21 09:37:10,626 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'dataSource' ...
2016-04-21 09:37:10,627 com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:578) DEBUG - Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main] interrupted. Shutting down.
2016-04-21 09:37:10,627 com.mchange.v2.c3p0.management.ActiveManagementCoordinator.attemptUnmanagePooledDataSource(ActiveManagementCoordinator.java:133) DEBUG - MBean: com.mchange.v2.c3p0:type=PooledDataSource[1hge13r9gf40tcgxr65ps|9fe45c] unregistered.
2016-04-21 09:37:10,628 com.mchange.v2.c3p0.management.ActiveManagementCoordinator.attemptUnmanageC3P0Registry(ActiveManagementCoordinator.java:85) DEBUG - C3P0Registry mbean unregistered.
2016-04-21 09:37:10,628 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.close(AbstractPoolBackedDataSource.java:417) DEBUG - com.mchange.v2.c3p0.ComboPooledDataSource@9fe45c has been closed.
java.lang.Exception: DEBUG STACK TRACE for PoolBackedDataSource.close().
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.close(AbstractPoolBackedDataSource.java:417)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
at org.nutz.ioc.ObjectProxy.depose(ObjectProxy.java:81)
at org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:93)
at org.nutz.ioc.impl.ScopeContext.depose(ScopeContext.java:100)
at org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:246)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:128)
at org.nutz.mvc.ActionHandler.(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.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2016-04-21 09:37:10,630 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'dao' ...
2016-04-21 09:37:10,631 org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:91) DEBUG - Depose object 'conf' ...
2016-04-21 09:37:10,631 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:249) INFO - org.nutz.ioc.impl.NutIoc@1948811 is deposed. startup date [16-04-21 09:37:09.549]
2016-4-21 9:37:10 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: Object 'nutQuartzJobFactory' without define! For object [nutQuartzJobFactory] - type:[] FAIL to create Ioc Bean name=[scheduler]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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:167)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
at org.nutz.mvc.ActionHandler.(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.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.nutz.ioc.IocException: Object 'nutQuartzJobFactory' without define! For object [nutQuartzJobFactory] - type:[] FAIL to create Ioc Bean name=[scheduler]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:147)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:204)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:148)
at com.risun.nutz.MainSetup.init(MainSetup.java:57)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
... 30 more
Caused by: org.nutz.ioc.IocException: Object 'nutQuartzJobFactory' without define! For object [nutQuartzJobFactory] - type:[]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:211)
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)
... 36 more
Caused by: org.nutz.ioc.ObjectLoadException: Object 'nutQuartzJobFactory' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:154)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:176)
... 40 more
2016-04-21 09:37:10,633 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:962) DEBUG - Preparing to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@10772d2
2016-04-21 09:37:10,633 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:468) DEBUG - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@10772d2
2016-4-21 9:37:10 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2016-4-21 9:37:10 org.apache.catalina.core.StandardContext start
严重: Context [/NutzBook] startup failed due to previous errors
2016-04-21 09:37:10,635 com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491) DEBUG - com.mchange.v2.c3p0.impl.NewPooledConnection@10772d2 closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
2016-04-21 09:37:10,635 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:476) DEBUG - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@10772d2
2016-04-21 09:37:10,635 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:967) DEBUG - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@10772d2
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/NutzBook] 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.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [NutzbookScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [NutzbookScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [NutzbookScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/NutzBook] appears to have started a thread named [NutzbookScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak.
2016-4-21 9:37:10 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2016-4-21 9:37:10 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2016-4-21 9:37:10 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2016-4-21 9:37:10 org.apache.catalina.startup.Catalina start
信息: Server startup in 2742 ms
2016-4-21 9:37:13 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1566)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics(SQLError.java:1220)
at com.mysql.jdbc.exceptions.jdbc4.CommunicationsException.(CommunicationsException.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:718)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

5 回复

换上最新quartz插件, 然后在工程里面找quartz.js, 删掉

兽总:按你说的改了之后现在打出的日志是这样的:
信息: Server startup in 2646 ms
2016-04-21 09:45:11,443 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:217) DEBUG - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@54be84.acquireResource() returning.
2016-04-21 09:45:11,443 com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1644) DEBUG - trace com.mchange.v2.resourcepool.BasicResourcePool@12bc418 [managed: 2, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@eb2756)
2016-04-21 09:45:11,443 com.mchange.v2.resourcepool.BasicResourcePool.decrementPendingAcquires(BasicResourcePool.java:422) DEBUG - decremented pending_acquires: 1
2016-04-21 09:45:11,445 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:217) DEBUG - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@54be84.acquireResource() returning.
2016-04-21 09:45:11,445 com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1644) DEBUG - trace com.mchange.v2.resourcepool.BasicResourcePool@12bc418 [managed: 3, unused: 3, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@eb2756)
2016-04-21 09:45:11,445 com.mchange.v2.resourcepool.BasicResourcePool.decrementPendingAcquires(BasicResourcePool.java:422) DEBUG - decremented pending_acquires: 0
2016-04-21 09:45:38,185 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:276) DEBUG - batch acquisition of 0 triggers
你帮我分析下现在是什么问题,定时任务应该启动之后我在下面的类中加入断点时候,它应该每隔时间段执行时进入断点,但是我的现在只打出
2016-04-21 09:48:41,203 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:276) DEBUG - batch acquisition of 0 triggers
这样一句log,断点也不近,什么情况啊,昨天一直在整合qurtz,到现在还是没找到什么原因
这句应该合适了吧cron.com.risun.nutz.quartz.job.CleanNonActiveUserJob=2 0/0 * * * ?
还有这个配置文件
org.quartz.scheduler.instanceName = NutzbookScheduler #这一句NutzbookScheduler是什么意思啊?
org.quartz.threadPool.threadCount = 3
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.scheduler.skipUpdateCheck=true

import java.util.Date;

import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import com.risun.nutz.pojo.BaseUsers;
@IocBean
public class CleanNonActiveUserJob implements Job{

 private static final Log log = Logs.get();

   @Inject protected Dao dao;

@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
    log.debug("clean Non-Active User , start");
    Date deadtime = new Date(System.currentTimeMillis() - 24*60*60*1000L); // 一天, 测试的时候可以改成1小时之类的
    Cnd cnd = Cnd.where("userId", ">", 5).and("userAddDate", "<", deadtime).and(Cnd.exps("userType", "=", "1").or("userType", "IS", null));
    int deleted = dao.clear(BaseUsers.class, cnd);
    log.debugf("delete %d BaseUsers", deleted);

}

}

  1. org.quartz.scheduler.instanceName = NutzbookScheduler 中的NutzbookScheduler只是quartz的实例名, 写abcdefg也一样没影响
  2. 把cron.properties中的任务定义生成quartz任务是NutQuartzCronJobFactory做的
  3. 需要在MainSetup.init方法中,调用ioc.get(NutQuartzCronJobFactory.class)才能触发生成quartz任务
  4. 关键就得看NutQuartzCronJobFactory相关的日志, 类似"job define name="

现在好了,感谢兽总...至此结贴

@qq_6c186ef5 写原因和解决方法啊

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