quartz 集群出现问题([DefaultQuartzScheduler_Worker-1] but has failed to stop it.)

原来想在把quartz集群  配置在  tomcat中.结果停止tomcat 时候出现问题了,线程给停止不了.在网上找了很久都没找到合适的解决方法.

后来把quartz部分完全从web应用中剥离出去,自己写一个Main程序把配置quartz的spring容器跑起来. 分别启动两个Main 集群成功.

 

三月 01, 2012 1:34:30 下午 org.apache.coyote.http11.Http11AprProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
三月 01, 2012 1:34:30 下午 org.apache.coyote.ajp.AjpAprProtocol pause
信息: Pausing Coyote AJP/1.3 on ajp-8009
三月 01, 2012 1:34:31 下午 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
三月 01, 2012 1:34:31 下午 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/blazeds] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@510530ae]) and a value of type [flex.messaging.io.SerializationContext] (value [flex.messaging.io.SerializationContext@2bbf1910]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
三月 01, 2012 1:34:31 下午 org.apache.catalina.core.ApplicationContext log
信息: Destroying Spring FrameworkServlet 'httpinvokerServlet'
三月 01, 2012 1:34:32 下午 org.apache.catalina.core.ApplicationContext log
信息: Destroying Spring FrameworkServlet 'hessianServlet'
三月 01, 2012 1:34:32 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/CHJ_G4] 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.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] 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.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [QuartzScheduler_DefaultQuartzScheduler-HEPENG-PC1330573367454_ClusterManager] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [QuartzScheduler_DefaultQuartzScheduler-HEPENG-PC1330573367454_MisfireHandler] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/CHJ_G4] appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/CHJ_G4] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6c4d554a]) and a value of type [flex.messaging.io.SerializationContext] (value [flex.messaging.io.SerializationContext@491aa4d2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
三月 01, 2012 1:34:32 下午 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/CHJ_G4] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@743afc7c]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@4c966c81]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
三月 01, 2012 1:34:33 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextDestroyed()
三月 01, 2012 1:34:33 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextDestroyed()
三月 01, 2012 1:34:33 下午 org.apache.coyote.http11.Http11AprProtocol destroy
信息: Stopping Coyote HTTP/1.1 on http-8080
三月 01, 2012 1:34:33 下午 org.apache.coyote.ajp.AjpAprProtocol destroy
信息: Stopping Coyote AJP/1.3 on ajp-8009
三月 01, 2012 1:34:43 下午 org.slf4j.impl.JDK14LoggerAdapter fillCallerData
严重: An error occured while scanning for the next trigger to fire.
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException [See nested exception: java.lang.NullPointerException]
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:170)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3785)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2753)
 at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:263)
Caused by: java.lang.NullPointerException
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:162)
 ... 3 more
三月 01, 2012 1:34:48 下午 org.slf4j.impl.JDK14LoggerAdapter fillCallerData
严重: MisfireHandler: Error handling misfires: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException [See nested exception: java.lang.NullPointerException]
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:170)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3132)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3923)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3943)
Caused by: java.lang.NullPointerException
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:162)
 ... 3 more
三月 01, 2012 1:34:49 下午 org.slf4j.impl.JDK14LoggerAdapter fillCallerData
严重: ClusterManager: Error managing cluster: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException [See nested exception: java.lang.NullPointerException]
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:170)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3208)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3847)
 at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3883)
Caused by: java.lang.NullPointerException
 at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:162)
 ... 3 more

你可能感兴趣的:(JAVA)