寒假时在家看视频学习ssh,第一次将它们整合在一起,就出了问题:
严重: The web application [/] 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.
2012-2-15 15:25:22 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.
我用的是strut2.2.3+hibernate3+spring2.5.6+tomcat7.0.22+mysql5
看tomcat的启动信息是,应用程序注册了jdbc驱动,但是结束时无法注销,tomcat于是为防止内存泄露,强制注销了,
网上说是DBCP的bug
于是按https://issues.apache.org/jira/browse/DBCP-332上讲的
另外写一个类,继承org.apache.commons.dbcp.BasicDataSource来注销jdbcimport java.sql.DriverManager;
import java.sql.SQLException;
import org.apache.commons.dbcp.BasicDataSource;
public class XBasicDataSource extends BasicDataSource
{
@Override
public synchronized void close() throws SQLException {
DriverManager.deregisterDriver(DriverManager.getDriver(url));
super.close();
}
}
于是问题终于解决了!不知还有没更好的方法?
分享到:
相关推荐
SEVERE: 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 ...
严重: The web application [/img] 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...
主要介绍了Tomcat报错: JDBC unregister 解决办法的相关资料,需要的朋友可以参考下
<br>原文件说明: <br>Compuware DriverStudio – DriverSuite Version 3.2 <br>Version 3.2 VisualStudio 2005 Integration fix. The purpose of this update is to allow DriverStudio – ...
I have not been able to reproduce these errors, but I believe the following work around will fix the problem: In the project options of *all* projects which uses these components, add the following...
Windows Installer注册表修复工具 作者源址:https://gist.github.com/heaths/77fbe0b44496960fab25c2eb0b9e8475
The Online Edition is similar to the Standard Edition, but the files for repairing are not included in Online Edition. Consequently, Internet connection is required when it is repairing the files. ...
The new viewer allows you to ignore differences in case and white space as usual, but it can also ignore differences in comments. Program Window enhancements The Program Window now highlights ...
第一步:如果已经安装过Zend Studio 9.0的,请打开Zend Studio 9.0,在菜单中“help>Unregister”,如果显示是灰的跳过此步退出Zend Studio。如果显示可以点击的请点击,这时Zend Studio会重启,重启到要求你填注册码...
The new viewer allows you to ignore differences in case and white space as usual, but it can also ignore differences in comments. Program Window enhancements The Program Window now highlights ...
How many times have you tried to register/unregister an ActiveX control (OCX) and wished there was a better way to do it then REGSVR32? ActiveX Manager enables users and developers to manage ...
Please place this entire folder (complete with contents) into your System32 directory folder ...Double click on the UnRegister .bat file to UnRegister It s as simple as that! Cheers
It is like a combo box, but it will drop down a calculator, which you can use for calculation<END><br>39,ColorPicker1.zip It is a color picker control, which is almost similar to those you find in...
旧版本版本的全志R16平台的tinav2.1的系统打开softAP 2017/9/14 17:25 版本:V1.0 1、原始编译: ...rootroot@cm-System-Product-Name:~$ cd /home/wwt/ ...rootroot@cm-System-Product-Name:/home/wwt$ tar zxvf...
MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if (fullscreen) // Attempt Fullscreen Mode? { ...
EventBus.unRegister(this) 实现事件 Event 实体类(实现 IEvent 接口) class XXXXEvent: IEvent 发送事件 EventBus.post(XXXEvent()) 利用注解实现事件订阅执行方法 tag 用于细化区分事件 mode 方法执行线程 @...
Introducing lifecycle to the paint program 73 ■ The OSGi framework’s role in the lifecycle 75 ■ The bundle activator manifest entry 76 ■ Introducing the lifecycle API 77 ■ Lifecycle state diagram...
MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if (fullscreen) // Attempt Fullscreen Mode? { DEVMODE dmScreenSettings; //...
Run ..\LibDump\LibDump.EXE using the command line option -Unregister b. Delete ..\LibDump. -------------------------- 4. COMMENTS AND BUG REPORT -------------------------- If you have any comments,...
For example on Android, activities and fragments should usually register according to their life cycle:@Override public void onStart() { super.onStart(); ModuleBus.getInstance().register(this)...