tomcat reload 时报web应用已停止,不能加载jdbc异常的解决方法

来源:互联网 发布:云熙软件 编辑:程序博客网 时间:2024/06/04 20:02

INFO: Illegal access: this web application instance has been stopped already. Could not load [com.mysql.jdbc.SQLError]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

解决方法:applicationContext.xml中配置的dbcp的class没有引用正确。
应将<bean id=”dbcp” class=”org.apache.commons.dbcp.BasicDataSource”>
改为<bean id=”dbcp” class=”org.apache.tomcat.dbcp.dbcp.BasicDataSource”>
后又在tomcat/lib下加入了mysql-connector-java-5.1.7-bin.jar此时reload后不再报错。

阅读全文
0 0