spring+quart後tomcat報錯

嚴重: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-11-1 16:13:07 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
web

嚴重: A web application appears to have started a thread named [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] but has failed to stop it. This is very likely to create a memory leak.spring


解決方案:數據庫

一、緣由是Hibernate3.5.0已經包含Hibernate Annotation jar,錯誤在於我從新加入了Hibernate Annotation和ejb3-persistence等jar文件apache

二、可能當前用的tomcat 6.0.26把他換成tomcat 6.0.20,就解決了(tomcat 6.0.26和6.0.24都會出現上面的問題)tomcat

三、緣由大概是說tomcat 6.025以後引入了一種內存泄露的檢查機制,會把不能垃圾收集的對像作日誌,可是說jdbc這個狀況好像並不太適用於這種狀況。一個辦法是在tomcat的server.xml文件中把<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>這個監聽給關了oracle

四、緣由是tomcat從新部署的時候產生的這個問題。由於從新部署的時候從新加載數據庫驅動程序,因此致使整個問題發生,每次部署的時候後仍是從新啓動tomcat或者把數據庫lib放在tomcat的lib裏面,能夠解決這個問題。app

五、檢查tomcat的lib裏面有沒有數據庫的lib驅動,沒有就要拋異常。spa

相關文章
相關標籤/搜索