ehcache版本问题
2016-05-25 09:30
627 查看
问题
答案
我靠,终于解决了,原来是ehcache版本的问题,ehcache-core2.5.0之前的版本不会出问题,2.5.0及之后会报这个异常,我选了个ehcache-core2.4.8的好使。
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.4.8</version>
</dependency>
看官方的文档说明:
Versions of Ehcache before version 2.5 allowed any number of CacheManagers with the same name (same configuration resource) to exist in a JVM.
Ehcache 2.5 and higher does not allow multiple CacheManagers with the same name to exist in the same JVM. CacheManager() constructors creating non-Singleton CacheManagers can violate this rule
rg.apache.shiro.cache.CacheException: 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版本的问题,ehcache-core2.5.0之前的版本不会出问题,2.5.0及之后会报这个异常,我选了个ehcache-core2.4.8的好使。
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.4.8</version>
</dependency>
看官方的文档说明:
Versions of Ehcache before version 2.5 allowed any number of CacheManagers with the same name (same configuration resource) to exist in a JVM.
Ehcache 2.5 and higher does not allow multiple CacheManagers with the same name to exist in the same JVM. CacheManager() constructors creating non-Singleton CacheManagers can violate this rule
相关文章推荐
- HDU 4862 Jump (最大费用流 | 经典建图)
- 详解OC的类和对象的底层实现机制
- faster-rcnn cpu实现
- Android socket 编程 实现消息推送(二)
- nginx如何开启https协议
- OC 字符串
- 二叉树的建立
- “领导喊你去办公室”电信诈骗现沪 专骗公务员
- angular js点击tab中的li标签加载相应div区域
- C语言学习心得一:__stdcall、__cdcel和__fastcall三者的区别(三者是对编译器层面的影响,对程序业务逻辑不影响)
- mac下查看端口使用的程序并强制关闭
- 函数式编程初探
- Linux Shell系列教程之(四)Shell注释
- 爬虫的框架
- js储存参数的数组arguments
- HTTP Status
- python np.linspace
- Android自定义button点击效果的两种方式
- jconsole
- 如何给Ubuntu linux 安装VMware Tools 工具