`
程序新手
  • 浏览: 58444 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

解决 ”To prevent a memory leak, the JDBC Driver has been forcibly unregistered“

 
阅读更多

     

   在开发过程中,添加完UrlWriter之后,部署到了服务器环境,发生了如下错误

    

To prevent a memory leak, the JDBC Driver has been forcibly unregistered.  

   

    原来Tomcat6会起一个线程检测是否有内存泄露

写道
Ignore those warnings. Tomcat is doing its job right. The actual bug is in someone else's code (the JDBC driver in question), not in yours. Be happy that Tomcat did its job properly and wait until the JDBC driver vendor get it fixed so that you can upgrade the driver.

Downgrade to Tomcat 6.0.23 or older so that you will not be bothered with those warnings. But it will silently keep leaking memory. Not sure if that's good to know after all. Those kind of memory leaks are one of the major causes behind OutOfMemoryError issues during Tomcat hotdeployments.

Move the JDBC driver to Tomcat's /lib folder and have a connection pooled datasource to manage the driver. Note that Tomcat's builtin DBCP does not deregister drivers properly on close. See also bug DBCP-322. The DBCP project is however currently stalling. I wouldn't expect quick updates. You would rather like to replace DBCP by another connection pool which is doing its job better then DBCP. For example BoneCP or Tomcat JDBC Pool maybe?

 

    解决办法有两个

    1) 将UrlWirter的Filter从web.xml中去掉或者重写destory方法

    2) 将Mysql的驱动包复制一份到Tomcat的Lib目录下

2
0
分享到:
评论

相关推荐

    关闭tomca报错t,网络整理

    关闭tomcat报错,网络搜索整理 严重: The web application [/img] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to... To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

    Proxool-0.9.1

    To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 十二月 02, 2013 8:19:43 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [/...

    S7A驱动720版本

    - The passing of invalid OPC Item IDs caused a memory leak in the driver's global memory. After the global memory was exhausted, the driver crashed. - The writing of strings failed when using ...

    Dropout:A Simple Way to Prevent Neural Networks from Overfitting.zip

    Dropout:A Simple Way to Prevent Neural Networks from Overfitting.zip

    BURNINTEST--硬件检测工具

    A 2 minute timeout has been added to the collection of system information. - Video playback, Hard disk and CD/DVD test 'no operations' error reporting changed. - When BurnInTest crashes, it will ...

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

    If you attempt to access a reserved address that has not yet been committed (backed by memory or disk) you will cause an access violation. Committed Memory Committed pages are those pages that when ...

    acpi控制笔记本风扇转速

    ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by ...

    a project model for the FreeBSD Project.7z

    Up until now, the FreeBSD project has released a number of described techniques to do different parts of work. However, a project model summarising how the project is structured is needed because of ...

    Sakemail

    .- Reduced the line sleep to 30 (tell me if this value doesn‘t work for you).27/4/981.7.0- Fixed a memory leak, thanks to Don Higgins.- Moved the string esErrorInFormatOfMsg to a property of SakPOP.-...

    XLSReadWriteII6.0.0.47 for Delphi 10.3.3 Rio FullSource

    This means that you do not worry about corrupting Excel files, this product has been tested repeatedly by the team and has the best data access strategies used to prevent any damage to files....

    Git-2.21.0-64-bit.zip

    * A test helper has been introduced to optimize preparation of test repositories with many simple commits, and a handful of test scripts have been updated to use it. Fixes since v2.22 -----------...

    AjaxControlToolkit 4.5 版本

    This release has been updated to fix three issues: Update to fix a conflict between the Ajax Control Toolkit and jQuery/jQuery UI. Update to the ToolkitScriptManager to prevent an error that resulted ...

    便携式测试控制器.pdf

    便携式测试控制器pdf,便携式测试控制器

    A Novel RFID Authentication Protocol with Ownership Transfer.doc

    1. A reader generates a random number Rr, and transmits a ClientHello(contains Rr) which is encrypted using the public key of the server to the database server. 2. A server generates a random number ...

    NexusDB Memory Manager 3.03 Full Source

    The Nexus Memory Manager helps prevent this by using a multi stage allocation system which preallocatessmall chunks of memory and leases parts of them to the application, whenever required. Inaddition...

    GA-H110TN.pdf

    • Before turning on the power, make sure the power supply voltage has been set according to the local voltage standard. • Before using the product, please verify that all cables and power ...

    Exploiting_Freelist[0]_On_XPSP2

    attempt to prevent the use of overwritten heap headers to do arbitrary byte writing. This method of exploiting heap overflows, and the protection offered by service pack 2, is widely known and has ...

    Common System and Software Testing Pitfalls How to Prevent and Mitigate epub

    Common System and Software Testing Pitfalls How to Prevent and Mitigate Them 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    解决Adding 'enum value' will prevent the debug session from continuing.zip

    解决Adding 'enum value' will prevent the debug session from continuing.zip

    新概念二第二单元测试卷(高清版).doc

    A.has been taken B.was taken C.is being taken 3.He was in __hurry that he almost pushed me over on the stairs. A.so B.such a C.such 4. All the students look forward to ______the sports meeting. A...

Global site tag (gtag.js) - Google Analytics