JBoss Fuse Container couldn't start with error Another CacheManager with same name '(cache name)' already exists in the same VM
Issue
We met an issue, the stack trace like below:
Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Another CacheManager with same name 'cache_newods-prod-server2' 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: URLConfigurationSource [url=bundle://142.0:1/META-INF/ehcache.xml]
at org.hibernate.cache.ehcache.EhCacheRegionFactory.start(EhCacheRegionFactory.java:110)[254:org.hibernate.ehcache:4.2.19.Final]
at org.hibernate.internal.CacheImpl.<init>(CacheImpl.java:70)[253:org.hibernate.core:4.2.22.Final-redhat-1]
at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:40)[253:org.hibernate.core:4.2.22.Final-redhat-1]
at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:35)[253:org.hibernate.core:4.2.22.Final-redhat-1]
at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:91)[253:org.hibernate.core:4.2.22.Final-redhat-1]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:201)[253:org.hibernate.core:4.2.22.Final-redhat-1]
... 24 more
Caused by: net.sf.ehcache.CacheException: Another CacheManager with same name 'cache_newods-prod-server2' 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: URLConfigurationSource [url=bundle://142.0:1/META-INF/ehcache.xml]
at net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName(CacheManager.java:529)[284:wrap_file__jboss_artifacts_pruforce-lib_ehcache-core-2.6.6.jar:0.0.0]
at net.sf.ehcache.CacheManager.init(CacheManager.java:374)[284:wrap_file__jboss_artifacts_pruforce-lib_ehcache-core-2.6.6.jar:0.0.0]
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)[284:wrap_file__jboss_artifacts_pruforce-lib_ehcache-core-2.6.6.jar:0.0.0]
at org.hibernate.cache.ehcache.EhCacheRegionFactory.start(EhCacheRegionFactory.java:94)[254:org.hibernate.ehcache:4.2.19.Final]
... 29 more
Environment
- Red Hat JBoss Fuse 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
