net.sf.ehcache.CacheException: Another unnamedCacheManager already exists in the same VM
来源:互联网 发布:数控机床加工编程 编辑:程序博客网 时间:2024/05/29 00:32
今天在项目中配置多SessionFactory,抛错
org.hibernate.cache.SingletonEhCacheRegionFactory
Caused by: net.sf.ehcache.CacheException: Another unnamedCacheManager already exists in the same VM. Please provide uniquenames for each CacheManager in the config or do one offollowing:
1. Use one of the CacheManager.create() static factory methodsto reuse same CacheManager with same name or create one ifnecessary
2. Shutdown the earlier cacheManager before creating new onewith same name.
经查,ehcache在2.5以后,CacheManager使用了Singleton,这样在创建多个CacheManager时就会产生上述错误。
http://ehcache.org/documentation/get-started/concepts 是官方解释
解决方法是在Hibernate的hibernateProperties配置中,加上
<propkey="hibernate.cache.region.factory_class">
</prop>
原文:http://blog.sina.com.cn/s/blog_6e0810c701014dmv.html
- net.sf.ehcache.CacheException: Another unnamedCacheManager already exists in the same VM
- net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM.
- Hibernate 异常CacheException: Another unnamed CacheManager already exists in the same VM
- Ehcache依赖版本问题:Another CacheManager with same name 'es' already exists in the same VM.
- Another unnamed CacheManager already exists in the same VM (ehCache 2.5) 解决办法
- 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.解决方法
- Ehcache配置时出错- Another unnamed CacheManager already exists in the same VM. Please provide unique name
- SpringBoot--P-1:缓存 Another unnamed CacheManager already exists in the same VM.
- 在整合springmvc+mybatis+ecache时候报错如下: Another unnamed CacheManager already exists in the same VM.
- java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
- net.sf.ehcache.CacheException:error setting options
- net.sf.ehcache.ObjectExistsException: Cache shiro-activeSessionCache already exists
- Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException异常处理
- hibernate Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
- hibernate报错java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
- JS 页面刷新或重载
- Spring web项目的单元测试
- linux中memset的正确用法
- c#生成大量随机码
- JunitTest拿spring容器bean的2种方式[Spring ClassPathXmlApplicationContext和FileSystemXmlApplicationContext]
- net.sf.ehcache.CacheException: Another unnamedCacheManager already exists in the same VM
- Android杂谈--ListView之SimpleAdapter的使用
- 为什么大型网站前端使用 PHP 后台逻辑用 Java?
- iOS获取通话状态
- PHP 学习笔记——接受表单数据。
- JAVA中Pattern和Matcher的用法 正则表达式相关
- Android 如何建立AIDL
- 直升机
- 附件上传、下载