`
zcw_java
  • 浏览: 305736 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Tomcat 6.0的This is very likely to create a memory leak.错误解决

 
阅读更多

從Apache Tomcat 5.5升級到6.0,通常不用太大的修改,原有的Web Application就能繼續運作。不過在server.xml中設定MySQL Datasource,卻出現一串惱人的警告訊息:

2010/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
嚴重的: The web application [/] registered the JBDC 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.
2010/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
嚴重的: The web application [/] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
2010/8/6 下午 01:54:11 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
嚴重的: The web application [/] 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.

更新MySQL Connector/J至最新版也沒用,似乎是Tomcat 6.0對於Memory Leak的防範變得比較雞婆智慧,才會多了這樣的警告。

既然被列為嚴重程度的警告,當然就不能視而不見,解決的方法並不難,只是要把原本設定在區段中的搬到,修改方式如下。

1. 將<Resource name="jdbc/NAME" auth="Container" type="javax.sql.DataSource" ... /> 整塊剪下,再貼到 <GlobalNamingResources> ... </GlobalNamingResources> 之間。

2. 在原本Resource標籤的位置加入<ResourceLink global="jdbc/NAME" name="jdbc/NAME" type="javax.sql.DataSource" />

转自http://wangqiaowqo.iteye.com/blog/1130545
分享到:
评论

相关推荐

    微软内部资料-SQL性能优化2

    A 32-bit process is normally limited to addressing 2 gigabytes (GB) of memory, or 3 GB if the system was booted using the /3G boot switch even if there is more physical memory available. By leveraging...

    Axure RP帮助文档

    3. Hyperlink 超链接:插入带链接的文本,模拟网页中的链接行为,用`&lt;a&gt;`标签表示。 4. Rectangle 矩形:创建矩形形状,通常用来定义页面区域或框定其他元素。 5. Placeholder 占位符:用于表示复杂或暂时不需修改的...

    Preproduction.Blueprint.How.to.Plan.Game.Environments.and.Level.Designs.2nd.Ed

    This could be for a playable level or a game environment exploration to show off in a portfolio. Planning process is called pre-production and what you end up with is a "Preproduction Blueprint". It...

    Direct Memory Access in Linux.doc

    This is likely due to the complex interactions between the kernel’s memory management and the physical memory layout. 3. **Kernel Modules and DMA Functions**: - **ioremap()**: This function maps ...

    程序员面试刷题的书哪个好-Front-end-questions-to-the-interview-stage:前端问题到面试阶段

    程序员面试刷题的书哪个好 开了交流群啦,欢迎加入交流心得 QQ群365780609 ...likely to cause a memory leak. 闭包有三个特性: Closures have three characteristics: 1.函数嵌套函数 2.函数内部可以

    计算机组成与结构体系英文课件:Chapter 8 – The Memory System - 2

    Memory Hierarchy is a design strategy implemented to bridge the gap between the Central Processing Unit (CPU) and the various types of memory, which have differing speed, capacity, and cost ...

    How to be a Programmer

    I confine myself to problems that a programmer is very likely to have to face in her work. Many of these problems and their solutions are so general to the human condition that I will probably seem ...

    亚信java笔试题-FE:前端资源收集

    亚信java笔试题 ...likely to cause a memory leak. 闭包有三个特性: Closures have three characteristics: 1.函数嵌套函数 2.函数内部可以引用外部的参数和变量 3.参数和变量不会被垃圾回收机制回收 Fu

    程序员面试刷题的书哪个好-NoteBook:练习记事本

    程序员面试刷题的书哪个好 ...likely to cause a memory leak. 闭包有三个特性: Closures have three characteristics: 1.函数嵌套函数 2.函数内部可以引用外部的参数和变量 3.参数和变量不会被垃圾回收机制回收

    applied wpf 4 in 2010

    In this book, I will show you how to create and implement WPF, using best practices to create a realworld application. At the same time, I’ll also show you how to structure and architect a WPF ...

    acpi控制笔记本风扇转速

    Fixed a possible memory leak and fault in AcpiExResolveObjectToValue during a read from a buffer or region field. (BZ 458) Fiodor Suietov. Example Code and Data Size: These are the sizes for the OS- ...

    a project model for the FreeBSD Project.7z

    This project model is not meant to be a tool to justify creating impositions for developers, but as a tool to facilitate coordination. It is meant as a description of the project, with an overview of...

    skyboxmove.unitypackage

    In this article, I will introduce how to use ShaderForge to create a flowing clouds animation. The completed animation will become like this. Let’s start creating this animation and set it so ...

    DIRegEx v7.0.0 XE2/XE3 32/64 Cracked

    DIRegEx is a library of Delphi (Embarcadero / CodeGear / Borland) components and procedures that implement regular expression pattern matching using the same syntax and semantics as Perl 5.10, with ...

    10231A.Designing.A.Microsoft.Sharepoint.2010.Infrastructure.Vol1

    This course is intended for IT Professionals who use Microsoft SharePoint 2010 in a team-based, medium-sized to large environment. While they may have implemented a SharePoint deployment, they have ...

    DIRegEx v8.6.8 for D4-XE10 字符 匹配 文本编辑

    DIRegEx is a library of Delphi (Embarcadero / CodeGear / Borland) components and procedures that implement regular expression pattern matching using the same syntax and semantics as Perl 5.10, with ...

    BURNINTEST--硬件检测工具

    This is a shareware program. This means that you need to buy it if you would like to continue using it after the evaluation period. Installation ============ 1) Uninstall any previous version of ...

    《算法导论》习题解答.rar

    It is very likely that there are many errors and that the solutions are wrong. If you have found an error, have a better solution or wish to contribute in some constructive way please send a message ...

    DIRegEx v8.5.0 for D4-XE6 cracked

    DIRegEx is a library of Delphi (Embarcadero / CodeGear / Borland) components and procedures that implement regular expression pattern matching using the same syntax and semantics as Perl 5.10, with ...

Global site tag (gtag.js) - Google Analytics