Druid在tomcat中报 java.lang.NoClassDefFoundError: com/mysql/jdbc/ProfilerEventHandlerFactory

Mrzeng 发布于 2014/09/17 10:07
阅读 8K+
收藏 0

@wenshao 你好,想跟你请教个问题:druid 在 apache tomcat 里面经常要出现这样的报错,百度了很久不得其解。

九月 17, 2014 9:53:31 上午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already.  Could not load com.mysql.jdbc.ProfilerEventHandlerFactory.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169)
at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776)
at com.alibaba.druid.filter.logging.LogFilter.connection_close(LogFilter.java:415)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)


Exception in thread "Druid-ConnectionPool-Destory-806406583" java.lang.NoClassDefFoundError: com/mysql/jdbc/ProfilerEventHandlerFactory
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169)
at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776)
at com.alibaba.druid.filter.logging.LogFilter.connection_close(LogFilter.java:415)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.ProfilerEventHandlerFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 10 more
[Druid-ConnectionPool-Destory-116271079] DEBUG druid.sql.Connection - {conn-10001} closed
Exception in thread "Druid-ConnectionPool-Destory-2069188819" java.lang.NoClassDefFoundError: com/mysql/jdbc/ProfilerEventHandlerFactory
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)

九月 17, 2014 9:53:31 上午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already.  Could not load com.mysql.jdbc.ProfilerEventHandlerFactory.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169)
at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776)
at com.alibaba.druid.filter.logging.LogFilter.connection_close(LogFilter.java:415)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)


Exception in thread "Druid-ConnectionPool-Destory-806406583" java.lang.NoClassDefFoundError: com/mysql/jdbc/ProfilerEventHandlerFactory
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169)
at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776)
at com.alibaba.druid.filter.logging.LogFilter.connection_close(LogFilter.java:415)
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.ProfilerEventHandlerFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 10 more
[Druid-ConnectionPool-Destory-116271079] DEBUG druid.sql.Connection - {conn-10001} closed
Exception in thread "Druid-ConnectionPool-Destory-2069188819" java.lang.NoClassDefFoundError: com/mysql/jdbc/ProfilerEventHandlerFactory
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4677)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1615)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82)
at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733)

加载中
0
冰剑
冰剑

我也是这样。。。

@wenshao

0
wenshao
wenshao
多个mysql driver混在一起冲突了?
zplswf
zplswf
druid需要和mysql版本对应吗,我这边也出现这个问题
冰剑
冰剑
就用了一个啊,没多个。。
0
Mr岳
Mr岳
jar包冲突~~~~~
冰剑
冰剑
能具体一点不?
0
Mr岳
Mr岳

this web application instance has been stopped already.---实例已经停止

因此不能假造com.mysql.jdbc.ProfilerEventHandlerFactory

又或者

Druid-ConnectionPool-Destory-806406583

com/mysql/jdbc/ProfilerEventHandlerFactory-----可能Druid要求的mysql的驱动包的版本相对较高

0
taojiang
taojiang

那么最后这个问题究竟是如何解决的呢,没人回答?

0
求贤科技
求贤科技

这问题解决了没? 解决了没?

返回顶部
顶部