NutzCN Logo
问答 com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Fri Dec
发布于 2304天前 作者 wx_rpjuhr9raigr60l213e0 9120 次浏览 复制 上一个帖子 下一个帖子
标签:
- Ioc depose tigger by GC!!!
Common Reason for that is YOUR code call 'new NutIoc(...)', and then get some beans(most is Dao) from it and abandon it!!!
If using nutz.mvc, call Mvcs.ctx().getDefaultIoc() to get ioc container.
Not nutz.mvc? use like this:     public static Ioc ioc;
- org.nutz.ioc.impl.NutIoc@880103818 is closing. startup date [17-12-29 11:20:27.077]
- {dataSource-3} closed
- org.nutz.ioc.impl.NutIoc@880103818 is deposed. startup date [17-12-29 11:20:27.077]
- Ioc depose tigger by GC!!!
Common Reason for that is YOUR code call 'new NutIoc(...)', and then get some beans(most is Dao) from it and abandon it!!!
If using nutz.mvc, call Mvcs.ctx().getDefaultIoc() to get ioc container.
Not nutz.mvc? use like this:     public static Ioc ioc;
- org.nutz.ioc.impl.NutIoc@1863719590 is closing. startup date [17-12-29 11:20:27.075]
- {dataSource-4} closed
- org.nutz.ioc.impl.NutIoc@1863719590 is deposed. startup date [17-12-29 11:20:27.075]
- Ioc depose tigger by GC!!!
Common Reason for that is YOUR code call 'new NutIoc(...)', and then get some beans(most is Dao) from it and abandon it!!!
If using nutz.mvc, call Mvcs.ctx().getDefaultIoc() to get ioc container.
Not nutz.mvc? use like this:     public static Ioc ioc;
- org.nutz.ioc.impl.NutIoc@1079702091 is closing. startup date [17-12-29 11:20:27.075]
- {dataSource-2} closed
- org.nutz.ioc.impl.NutIoc@1079702091 is deposed. startup date [17-12-29 11:20:27.075]
- Ioc depose tigger by GC!!!
Common Reason for that is YOUR code call 'new NutIoc(...)', and then get some beans(most is Dao) from it and abandon it!!!
If using nutz.mvc, call Mvcs.ctx().getDefaultIoc() to get ioc container.
Not nutz.mvc? use like this:     public static Ioc ioc;
- org.nutz.ioc.impl.NutIoc@745347091 is closing. startup date [17-12-29 11:20:27.071]
- {dataSource-1} closed
- org.nutz.ioc.impl.NutIoc@745347091 is deposed. startup date [17-12-29 11:20:27.071]
com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Fri Dec 29 11:21:21 CST 2017
        at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1057)
        at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:960)
        at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:940)
        at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:930)
        at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:102)
        at cn.kiway.common.util.iocUtil.getConn(iocUtil.java:111)
        at cn.kiway.common.util.iocUtil.getConn(iocUtil.java:58)
        at cn.kiway.rpcobj.KwRpc.query(KwRpc.java:1214)

2 回复

好的,谢谢,我改一下看看

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