Another unnamed CacheManager already exists in the same VM.解决方法
来源:互联网 发布:怎么用java写服务器 编辑:程序博客网 时间:2024/05/24 06:15
最近在研究缓存框架Ehcache的配置和使用,我想根据多个ehcache.xml创建多个CacheManager对象,但是报了异常:
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
2. Shutdown the earlier cacheManager before creating new one with same name.
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
2. Shutdown the earlier cacheManager before creating new one with same name.
错误提示很明显:Ehcache不允许创建同样名称的CacheManager对象。如果我们没有ehcache.xml中配置CacaheManager的名称,那么默认的名称是__DEFAULT__。解决方式是<ehcache name="">中配置CacheManager的名称,并确保唯一。这样如下代码就不会报错了
第一个ehcache配置文件:
第二个ehcache配置文件:
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.
- PHP中this,self,parent的区别及使用方法
- Nginx + PHP (Windows安装)
- 睡眠情况
- linux通过grep kill掉tomcat进程脚本,百分百kill掉
- ie9的placeholder不显示的解决办法(包含多个密码框)
- Another unnamed CacheManager already exists in the same VM.解决方法
- 学习网站/博客论坛推荐(二)
- JAVA常用方法
- Section=ResponseHeader Detail=标头名称无效
- 改变Dialog的样式
- POJ 3253 Fence Repair(贪心—霍夫曼树or优先队列)
- oracle创建表空间和用户
- 灵活运用 SQL SERVER FOR XML PATH
- MVC4 无刷新分页!