Another unnamed CacheManager already exists in the same VM.解决方法
来源:互联网 发布:剑三丐姐脸型数据 编辑:程序博客网 时间:2024/06/06 02:34
Caused by: net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
出现这个错误,看源码
就是configuration.getName()的名字不为null或者为null就使用默认的
这里这个name的值是不是存在,不存在就给个默认的,存在就取这个name的值。
之后CACHE_MANAGERS_MAP这个map通过这个name的key值取获取值,如果获取不到就是null,那就添加,如果获取到了,就报上面那个错,说已经初始化过了。也就是跟你有没有写name其实没有关系。因为这个put添加操作只会在这里执行,所以报这个错就表明你的代码走了2次这个地方,已经添加过一次了,一般是初始化的时候初始化了2次
<property name="net.sf.ehcache.configurationResourceName" value="ehcache.xml" />这个类了
找到问题所在就找出我们在哪里初始化了2次这个地方
第一个地方,在配置文件里面初始化了c3p0,里面就有这个缓存类的初始化。
第二个地方,在basedao里面又初始化了一次c3p0,所以报错
所以注释掉它就可以了。
0 0
- Another unnamed CacheManager already exists in the same VM.解决方法
- Another unnamed CacheManager already exists in the same VM.解决方法
- Another unnamed CacheManager already exists in the same VM
- Another unnamed CacheManager already exists in the same VM
- Hibernate 异常CacheException: Another unnamed CacheManager already exists in the same VM
- net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM.
- SpringBoot--P-1:缓存 Another unnamed CacheManager already exists in the same VM.
- Another unnamed CacheManager already exists in the same VM (ehCache 2.5) 解决办法
- Ehcache配置时出错- Another unnamed CacheManager already exists in the same VM. Please provide unique name
- 在整合springmvc+mybatis+ecache时候报错如下: Another unnamed CacheManager already exists in the same VM.
- Ehcache依赖版本问题:Another CacheManager with same name 'es' already exists in the same VM.
- net.sf.ehcache.CacheException: Another unnamedCacheManager already exists in the same VM
- Socket file /var/lib/mysql/mysql.sock exists. Is another MySQL daemon already running with the same
- Socket file /tmp/mysql.sock exists. Is another MySQL daemon already running with the same unix socke
- Another MySQL daemon already running with the same unix socket
- Another MySQL daemon already running with the same unix socket.
- Another MySQL daemon already running with the same unix socket
- Another MySQL daemon already running with the same unix socket.
- Linux vim使用教程
- 创建China Azure只读用户
- android 快捷方式
- ElasticSearch——跨域访问
- 汇编:动态画出一棵七彩圣诞树
- Another unnamed CacheManager already exists in the same VM.解决方法
- iOS 查找子视图
- jquery checked 操作多选
- Android 网络框架Volley源码讲解
- xUtils框架
- Sping基础
- java 常用方法记录
- hdu 2586 How far away ? lca求最短路
- SASS学习