2015-07-21 54 views
1

我想使用Spring Security ACL plugin。我跟着从这里正式文档教程:http://grails-plugins.github.io/grails-spring-security-acl/docs/manual/guide/tutorial.html无法运行Grails ACL插件:使用名称'afterAclCollectionRead'创建bean时出错

运行时我得到了以下错误示例:

Configuring Spring Security Core ... 
... finished configuring Spring Security Core 
Configuring Spring Security ACL ... 
... finished configuring Spring Security ACL 
| Error 2015-07-21 15:06:13,267 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'afterAclCollectionRead': Cannot resolve reference to bean 'aclService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityAclAclService': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCache': Cannot resolve reference to bean 'ehcacheAclCache' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehcacheAclCache': Cannot resolve reference to bean 'aclCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
Message: Error creating bean with name 'afterAclCollectionRead': Cannot resolve reference to bean 'aclService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityAclAclService': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCache': Cannot resolve reference to bean 'ehcacheAclCache' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehcacheAclCache': Cannot resolve reference to bean 'aclCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
    Line | Method 
->> 266 | run  in java.util.concurrent.FutureTask 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run  in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'springSecurityAclAclService': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCache': Cannot resolve reference to bean 'ehcacheAclCache' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehcacheAclCache': Cannot resolve reference to bean 'aclCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
->> 266 | run  in java.util.concurrent.FutureTask 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run  in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'aclCache': Cannot resolve reference to bean 'ehcacheAclCache' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehcacheAclCache': Cannot resolve reference to bean 'aclCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
->> 266 | run  in java.util.concurrent.FutureTask 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run  in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'ehcacheAclCache': Cannot resolve reference to bean 'aclCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
->> 266 | run  in java.util.concurrent.FutureTask 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run  in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'aclCacheManager': Invocation of init method failed; nested exception is 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. 
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ] 
->> 266 | run  in java.util.concurrent.FutureTask 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run  in java.lang.Thread 
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 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 392 | init  in  '' 
| 270 | <init> . in  '' 
| 266 | run  in java.util.concurrent.FutureTask 
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor 
| 617 | run  in java.util.concurrent.ThreadPoolExecutor$Worker 
^ 745 | run . . . in java.lang.Thread 
Error | 
Forked Grails VM exited with error 

是什么原因造成这个错误?

回答

相关问题