<bean id="shirocacheManager"
class="org.apache.shiro.cache.ehcache.EhCacheManager"  scope="singleton" >
                <property name="cacheManagerConfigFile"
value="classpath:ehcache-shiro.xml" />
        </bean>

I change the bean id , then It is ok now. 

but after I config the followed information, the new error appear.
        <bean id="securityManager"
class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">  
                <property name="realm" ref="myRealm" /> 
                <property name="cacheManager" ref="shirocacheManager" />
        </bean>

the error  is :
Property 'cacheManager' threw exception;
 nested exception is org.apache.shiro.cache.CacheException:
net.sf.ehcache.CacheException: Another CacheManager with sam
e name 'shiroehcache1' already exists in the same VM. 

in ehcache-shiro.xml ,I set the information:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
    xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"; 
    name="shiroehcache1">

I only set "shiroehcache1" indeed. what is wrong?



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/CacheManager-convert-error-tp7579236p7579238.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to