grails插件具有冲突的cachemanager名称

grails插件具有冲突的cachemanager名称,grails,gorm,ehcache,Grails,Gorm,Ehcache,我正在尝试开发一个Grails2.4.X插件来添加域对象。当我运行我的应用程序时,我在应用程序中得到了以下信息,包括插件: Caused by 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

我正在尝试开发一个Grails2.4.X插件来添加域对象。当我运行我的应用程序时,我在应用程序中得到了以下信息,包括插件:

Caused by 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.
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]
->>  628 | assertNoCacheManagerExistsWithSameName in net.sf.ehcache.CacheManager
我假设DataSource和Config(在插件中)被过度写入

我更新了用于使用BeanEhcacheRegionFactory4的插件:

hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = false
//    cache.region.factory_class = 'net.sf.ehcache.hibernate.BeanEhcacheRegionFactory' // Hibernate 3
    cache.region.factory_class = 'org.hibernate.cache.ehcache.BeanEhcacheRegionFactory4' // Hibernate 4
    singleSession = true // configure OSIV singleSession mode
    flush.mode = 'manual' // OSIV session flush mode outside of transactional context
}

我没有ehcache.xml,所以我假设它使用groovy配置

这是不是可以通过移动到2.5/3来修复

删除ehcache插件“修复”了这个问题