NutzCN Logo
问答 在停TOMCAT的时候报错
发布于 2449天前 作者 qq_e78b3792 1469 次浏览 复制 上一个帖子 下一个帖子
标签:

JDK1.8 TOMCAT8.5 MYSQL5.7 druid

14:46:09.447 ERROR (DruidDataSourceStatManager.java:204) removeDataSource - unregister mbean error
javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSource,id=workerman
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ~[?:1.8.0_144]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427) ~[?:1.8.0_144]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415) ~[?:1.8.0_144]
	at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546) ~[?:1.8.0_144]
	at com.alibaba.druid.stat.DruidDataSourceStatManager.removeDataSource(DruidDataSourceStatManager.java:202) [druid-1.1.6.jar:1.1.6]
	at com.alibaba.druid.pool.DruidDataSource$2.run(DruidDataSource.java:1845) [druid-1.1.6.jar:1.1.6]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144]
	at com.alibaba.druid.pool.DruidDataSource.unregisterMbean(DruidDataSource.java:1841) [druid-1.1.6.jar:1.1.6]
	at com.alibaba.druid.pool.DruidDataSource.close(DruidDataSource.java:1800) [druid-1.1.6.jar:1.1.6]
	at com.alibaba.druid.pool.DruidDataSource$FM$close$62febe830a4a6764c634d9e263964cee.invoke(DruidDataSource.java) [nutz-1.r.65.jar:1.1.6]
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.ioc.ObjectProxy.depose(ObjectProxy.java:83) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.ioc.impl.ScopeContext.clear(ScopeContext.java:114) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.ioc.impl.ScopeContext.depose(ScopeContext.java:121) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:296) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.mvc.impl.NutLoading.depose(NutLoading.java:439) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.mvc.ActionHandler.depose(ActionHandler.java:35) [nutz-1.r.65.jar:1.r.65]
	at org.nutz.mvc.NutFilter.destroy(NutFilter.java:137) [nutz-1.r.65.jar:1.r.65]
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:318) [catalina.jar:8.5.20]
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4623) [catalina.jar:8.5.20]
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5421) [catalina.jar:8.5.20]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226) [catalina.jar:8.5.20]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435) [catalina.jar:8.5.20]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424) [catalina.jar:8.5.20]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
14:46:09.452 INFO  (DruidDataSource.java:1817) close - {dataSource-1} closed
14:46:09.452 INFO  (NutIoc.java:300) depose - org.nutz.ioc.impl.NutIoc@1598044554 is deposed. startup date [18-03-03 13:55:59.327]
14:46:09.452 INFO  (NutLoading.java:445) depose - Nutz.Mvc[nutz] is down in 1115ms
03-Mar-2018 14:46:09.461 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [workerman] appears to have started a thread named [pool-4-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
 sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
 sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117)
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
 org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:340)
 org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
 org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
 java.lang.Thread.run(Thread.java:748)
3 回复
dao.js
var ioc = {
		conf : {
			type : "org.nutz.ioc.impl.PropertiesProxy",
			fields : {
				paths : ["config/"]
			}
		},
	    dataSource : {
			factory : "$conf#make",
			args : ["com.alibaba.druid.pool.DruidDataSource", "db."],
	        type : "com.alibaba.druid.pool.DruidDataSource",
	        events : {
	        	create : "init",
	            depose : 'close'
	        }
	    },
		slaveDataSource : {
			factory : "$conf#make",
			args : ["com.alibaba.druid.pool.DruidDataSource", "db."],
			type : "com.alibaba.druid.pool.DruidDataSource",
			events : {
				create : "init",
				depose : 'close'
			}
		},
		dao : {
			type : "org.nutz.dao.impl.NutDao",
			args : [{refer:"dataSource"}],
			fields : {
				executor : {refer:"cacheExecutor"},
				runner : {refer: "daoRunner"}
			}

		},
		daoRunner : {
			type : "org.nutz.dao.impl.sql.run.NutDaoRunner",
			fields : {
				slaveDataSource : {refer:"slaveDataSource"} //引用slave数据源
			}
		},
		cacheExecutor : {
			type : "org.nutz.plugins.cache.dao.CachedNutDaoExecutor",
			fields : {
				cacheProvider : {refer:"cacheProvider"},
				cachedTableNames : ["sys_user", "sys_role", "sys_menu","sys_role_menu","sys_unit","sys_user_role","sys_work_class","sys_work_type","sys_city","sys_county","sys_province","sys_project_type"]
			}
		},
		/*
		// 基于内存的简单LRU实现
		cacheProvider : {
			type : "org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider",
			fields : {
				cacheSize : 10000 // 缓存的对象数
			},
			events : {
				create : "init"
			}
		}
		*/
    /*
    // 基于Ehcache的DaoCacheProvider
    cacheProvider : {
        type : "org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider",
        fields : {
            cacheManager : {refer:"cacheManager"} // 引用ehcache.json中定义的CacheManager
        },
        events : {
            create : "init"
        }
    }*/
	cacheProvider : {
		type : "org.nutz.plugins.cache.dao.impl.provider.RedisDaoCacheProvider",
		fields : {
			jedisPool : {refer:"jedisPool"} //
		},
		events : {
			create : "init"
		}
	}
};

druid本身的问题,与nutz无关

我把读写分离去了,就好了

添加回复
请先登陆
回到顶部