Hello all, 

I am trying to get EhCache configured to handle authorization caching.
Currently I am getting the following exception:
org.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.

My shiro.ini looks like:
[main]
...
cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager
cacheManager.cacheManagerConfigFile = classpath:ehcache.xml
securityManager.cacheManager = $cacheManager

>From this StackOverflow post it looks like people using Spring have gotten
around this issue by forcing the CacheManager to be a singleton
(http://stackoverflow.com/questions/10013288/another-unnamed-cachemanager-already-exists-in-the-same-vm-ehcache-2-5)

Is anybody aware of work-arounds not using Spring initialization? Is there
some manner of enforcing singleton configuration from the shiro.ini?

Thank you in advance

--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/EhCache-initialization-exception-Another-unnamed-CacheManager-already-exists-in-the-same-VM-tp7577532.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to