2015-09-26 10:44:49,670 [yunshenkeji1509-startStop-2] DEBUG org.nutz.ioc.impl.ScopeContext - Depose object 'dataSource' ...
2015-09-26 10:44:49,678 [yunshenkeji1509-startStop-2] ERROR com.alibaba.druid.stat.DruidDataSourceStatManager - unregister mbean error
javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat
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:546)
at com.alibaba.druid.stat.DruidDataSourceStatManager.removeDataSource(DruidDataSourceStatManager.java:200)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
at org.nutz.ioc.ObjectProxy.depose(ObjectProxy.java:81)
at org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:93)
at org.nutz.ioc.impl.ScopeContext.depose(ScopeContext.java:100)
at org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:227)
at org.nutz.mvc.impl.NutLoading.depose(NutLoading.java:405)
at org.nutz.mvc.ActionHandler.depose(ActionHandler.java:35)
at org.nutz.mvc.NutFilter.destroy(NutFilter.java:124)
at com.xy.businessmg.mvc.BusinessMGNutFilter.destroy(BusinessMGNutFilter.java:55)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:313)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4866)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5679)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1591)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1580)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
问答
javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat
16 回复
额 我在网上找的资料也是
首先,tomcat本身是支持部署多应用的,本文的项目因都使用了druid数据源而引起。
因为两个项目都使用了druid数据源,而且,指向的数据库也一致,启动时报错:ERROR [com.alibaba.druid.stat.DruidDataSourceStatManager] - unregister mbean error
解决办法:在tomcat的JVM参数中需要增加-Ddruid.registerToSysProperty=true
同时,两个web应用的webAppRootKey的值也不能一致。
不明白的是 在哪里加 ?
以及 webAppRootKey 的设置 @wendal
ok @Rekoe 谢谢 按照wendal 的方法弄了下,测试可以, 如果还出现在换个试试
换15的 不行 ,tomcat的启动参数, JAVA_OPTS 我是 在.bat 后面加的 也不行 @wendal
env.bat 在哪里 tomcat的 还是 什么? @wendal
setenv.bat
在tomcat.bat目录里面的, 默认没有, 自行添加
http://stackoverflow.com/questions/17147117/in-which-file-tomcat-java-memory-options-are-saved
还是 不行! @wendal
@javanan 那就只能去问druid的维护者了
自豪地采用 NutzCN ionic
@javanan 大佬,请问上述问题是否已经解决?同样错误,出现之后系统就无法访问了,显示网络错误
添加回复
请先登陆