@JFinal 你好
我的JFinal项目运行在Tomcat的环境下,启动时Druid并未报错,但是在运行时出现了以下错误
[com.alibaba.druid.stat.DruidStatService.unregisterMBean()]: unregister mbean error
javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidStatService
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:536)
at com.alibaba.druid.stat.DruidStatService.unregisterMBean(DruidStatService.java:366)
at com.alibaba.druid.stat.DruidDataSourceStatManager.removeDataSource(DruidDataSourceStatManager.java:205)
at com.alibaba.druid.pool.DruidDataSource$2.run(DruidDataSource.java:1413)
at java.security.AccessController.doPrivileged(Native Method)
at com.alibaba.druid.pool.DruidDataSource.unregisterMbean(DruidDataSource.java:1409)
at com.alibaba.druid.pool.DruidDataSource.close(DruidDataSource.java:1368)
at com.jfinal.plugin.druid.DruidPlugin.stop(DruidPlugin.java:180)
at com.jfinal.core.JFinal.stopPlugins(JFinal.java:113)
at com.jfinal.core.JFinalFilter.destroy(JFinalFilter.java:87)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:313)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4951)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5778)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1590)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1579)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
这个是druid本身的bug,可以参见此文:
http://blog.csdn.net/lanmo555/article/details/41248763
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。