1. 程式人生 > >javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat解決方案

javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat解決方案

opts .get 代碼 instance intercept blog htm bean except

ERROR [com.alibaba.druid.stat.DruidDataSourceStatManager] – unregister mbean error
javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean………

原因:在一臺服務器上啟動了兩個tomcat,兩個tomcat都是用druid。

解決方案:

修改Tomcat 下的 catalina.sh:

增加此句代碼: JAVA_OPTS=”-Ddruid.registerToSysProperty=true”

轉載自:http://www.cnblogs.com/gradven/p/6323195.html

javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat解決方案