1. 程式人生 > >quartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak解決

quartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak解決

出現此問題是由一於spring 啟動了quartz,而當tomcat 關閉的時候而沒有關閉造成的。

在web 加一個監聽器當關系的時候判斷作業是否啟動,啟動就關閉。

<!-- 作業監聽器 -->
 <listener>
   <listener-class>cn.test.job.JobListener</listener-class>
 </listener>

public class JobListener implements ServletContextListener {

 public void contextDestroyed(ServletContextEvent arg0) {
  Scheduler job = (Scheduler) SpringBeanLoader.getSpringBean("quartzScheduler");
  try {
   if(job.isStarted()){
    job.shutdown();
    Thread.sleep(1000);
   }
  } catch (SchedulerException e) {
   e.printStackTrace();
  } catch (InterruptedException e) {
   e.printStackTrace();
  }

 }

 public void contextInitialized(ServletContextEvent arg0) {
  

 }

 加 上過後會有此顯示,建立的10個執行緒就會被關閉。如果Thread.sleep(1000)如果不會有些執行緒不會關閉。不知道有什麼更好方法不。

2012-03-15 10:56:10,063 DEBUG [quartzScheduler_Worker-4] - WorkerThread is shutting down
2012-03-15 10:56:10,073 DEBUG [quartzScheduler_Worker-7] - WorkerThread is shutting down
2012-03-15 10:56:10,083 DEBUG [quartzScheduler_Worker-9] - WorkerThread is shutting down

嚴重: The web application [/blazeds] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and a value of type [flex.messaging.io.SerializationContext] (value [[email protected]]) 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] 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 [/xxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [

[email protected]]) and a value of type [flex.messaging.io.SerializationContext] (value [[email protected]]) 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 [/xxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlma[email protected]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

加上過後再停止tomcat 就會顯示相應執行緒就會關閉。

2012-03-15 10:56:10,063 DEBUG [quartzScheduler_Worker-4] - WorkerThread is shutting down
2012-03-15 10:56:10,073 DEBUG [quartzScheduler_Worker-7] - WorkerThread is shutting down
2012-03-15 10:56:10,083 DEBUG [quartzScheduler_Worker-9] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-2] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-1] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-5] - WorkerThread is shutting down
2012-03-15 10:56:10,144 DEBUG [quartzScheduler_Worker-8] - WorkerThread is shutting down
2012-03-15 10:56:10,184 DEBUG [quartzScheduler_Worker-3] - WorkerThread is shutting down
2012-03-15 10:56:10,184 DEBUG [quartzScheduler_Worker-10] - WorkerThread is shutting down


2012-03-15 10:56:10,063 DEBUG [quartzScheduler_Worker-4] - WorkerThread is shutting down
2012-03-15 10:56:10,073 DEBUG [quartzScheduler_Worker-7] - WorkerThread is shutting down
2012-03-15 10:56:10,083 DEBUG [quartzScheduler_Worker-9] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-2] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-1] - WorkerThread is shutting down
2012-03-15 10:56:10,104 DEBUG [quartzScheduler_Worker-5] - WorkerThread is shutting down
2012-03-15 10:56:10,144 DEBUG [quartzScheduler_Worker-8] - WorkerThread is shutting down
2012-03-15 10:56:10,184 DEBUG [quartzScheduler_Worker-3] - WorkerThread is shutting down
2012-03-15 10:56:10,184 DEBUG [quartzScheduler_Worker-10] - WorkerThread is shutting down

相關推薦

quartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak解決

出現此問題是由一於spring 啟動了quartz,而當tomcat 關閉的時候而沒有關閉造成的。 在web 加一個監聽器當關系的時候判斷作業是否啟動,啟動就關閉。 <!-- 作業監聽器 -->  <listener>    <listener

This is very likely to create a memory leak. Stack trace of thread錯誤分析

1、問題描述 啟動tomcat部署專案時,報This is very likely to create a memory leak. Stack trace of thread錯誤。 29-May-2018 12:30:09.322 SEVERE [localhos

tomcat報錯:This is very likely to create a memory leak問題解決

這種問題在開發中經常會碰到的,看看前輩的總結經驗 Tomcat記憶體溢位的原因   在生產環境中tomcat記憶體設定不好很容易出現記憶體溢位。造成記憶體溢位是不一樣的,當然處理方式也不一樣。   這裡根據平時遇到的情況和相關資料進行一個總結。常見的一般會

This is very likely to create a memory leak 異常

INFO [cn.com.ksplatform.core.expand.spring.SpringContext] - Closing Root WebApplicationContext: startup date [Mon Dec 12 18:31:08 CST 201

To prevent a memory leak, the JDBC Driver has been forcibly unregistered. && spring註解方式 idea報could

問題: 在idea中啟動專案,之前是好好地,結果突然不行了,但看這種錯誤,很難發現原因所在,網上的很多方法都不起作用,首先要找到自己問題的所在, 建議直接看tomcatLocalhost.log這個選項卡里的內容,可以直接定位問題。我的原因是因為serv

[SQL] - Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 問題之解決

img png .com 異常 hresult image select att blog 場景: 使用 Oracle.DataAccess.dll 訪問數據庫時,OracleDataAdapter 執行失敗。 異常: System.AccessViolationExce

registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped.

配置錯誤 value ror been leak param cccccc 錯誤 tex 最近在用maven整合SSH做個人主頁時候,在eclipse裏面使用tomcat7插件發布項目是沒有問題的,但當打包成war之後,使用tomcat7單獨發布項目,就出現了以下的錯誤.

Ubuntu 16.04: How to resolve libqt5x11extras5 (>= 5.1.0) but it is not going to be installed

Issue: When you install Virtualbox 5.1 on Ubuntu 16.04, you may encounter following error: [email protected]:~/Downloads# apt install virtualbox-5.

org.apache.catalina.LifecycleException: Failed to stop component(生命周期異常)

str .com .cn 除了 nbsp serve pre was acc 真是郁悶透頂,以前昨天還可以用,換了myeclipse自帶的tomcat就可以用: 異常: org.apache.catalina.LifecycleException: Failed to

Failed to stop iptables.service: Unit iptables.service not loaded.解決方法

mov tab -i rhel pla conf sdn -s 解決方法 CentOS7中執行 service iptables start/stop 會報錯Failed to start iptables.service: Unit iptables.service

This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime

使用 ConstraintLayout 遇到的問題 This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime ConstraintLayout

錯誤:libatk1.0-0 : Depends: libatk1.0-data (>= 2.30.0-1) but 2.28.1-1 is to be installed

在Ubuntu下安裝檔案時遇到以下錯誤: The following packages have unmet dependencies: libatk1.0-0 : Depends: libatk1.0-data (>= 2.30.0-1) but 2.28.1-1 is t

The security settings could not be applied to the database because the connection has failed

The security settings could not be applied to the database because the connection 

解決RuntimeError: cuda runtime error (30) : unknown error at /pytorch/aten/src/THC/THCGeneral.cpp:70&NVIDIA-SMI has failed because it couldn't c

解決兩個問題: (1)RuntimeError: cuda runtime error (30) : unknown error at /pytorch/aten/src/THC/THCGeneral.cpp:70 (2)NVIDIA-SMI has failed because it couldn

關於Mysql unable to connect to remote host. catalog download has failed.

使用MSI安裝Mysql會在windows中新增一個計劃任務,如下圖。 但網友解決方案是刪除這個計劃,但卻不告知這個任務計劃啟動的操作:"C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerCon

錯誤:libatk1.0-0 : Depends: libatk1.0-data (>= 2.30.0-1) but 2.28.1-1 is to be installed

在Ubuntu下安裝檔案時遇到以下錯誤: The following packages have unmet dependencies: libatk1.0-0 : Depends: libatk1.

but not all confident their IT is up to it | AITopics

Data analytics, cloud and cyber security are the key technologies for CIOs today – but a fair proportion are looking at artificial intelligence (AI) and ma

Amazon built an AI tool to hire people but had to shut it down because it was discriminating against women

Amazon worked on building an artificial-intelligence tool to help with hiring, but the plans backfired when the company discovered the system discriminated

It’s Too Late to Stop Trusting Facebook

Years ago, before there were iPhones, smartwatches, or presidential tweets, I gave Facebook everything. And why not? I was a teenager, probably loaded on B

Growth at any Cost: Social Media has Made the World a Worse Place, Here’s How To Fix It

Growth at any Cost: Social Media has Made the World a Worse Place, Here’s How To Fix ItDan McComas, former head of product at Reddit, gave a very candid in