EHC ❯ CacheException when clustered cache created programatically
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
ehcache-core
-
-
hsingh
-
Reporter: hsingh
-
October 09, 2009
-
0
-
Watchers: 0
-
January 17, 2013
-
April 30, 2010
Attachments
Description
Got following error while testing ohsm test with ehcache 1.7.0. We are creating cache programmatically in the test.
Caused by: net.sf.ehcache.CacheException: no terracotta configuration has been initalized for this cache manager at net.sf.ehcache.CacheManager.createTerracottaStore(CacheManager.java:323) at net.sf.ehcache.Cache.initialise(Cache.java:694) at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:784) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:774) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:752)
As per Geert, “there seems to be a bug wrt to the config stuff from what I read, you need to have a terracotta clustered cache in the ehcache configuration file for the store to be created. if you don’t and add a TC clustered cache programmatically then the clustered memory store isn’t initialized for that since so maybe just add a dummy cache to the ehcache.xml file that is clustered”.
Comments
Himadri Singh 2009-11-02
Abhishek Singh 2009-11-04
Fixed. Also fixed a bug as bonus for this :), throw exception when user is running without standalone jar, with tim jars and running without tc.
Himadri Singh 2009-12-08
Verified in rev
product-name = Ehcache Core version = 1.7.1 built-by = cruise build-jdk = 1.6.0_17 build-time = 2009-11-30 02:20:28 build-revision = 1471
ehcache-core-1.7.0.jar is throwing the exception while ehcache-core-1.7.1.jar works fine.
Gary Keim 2010-04-21
Another issue related to this problem is that your SampledCacheManager MBeans won’t be registered so there will be no content in the DevConsole panel.
Fiona OShea 2010-04-27
What is the issue? The Dev Console?
Gary Keim 2010-04-28
The issue currently is that the MBean isn’t properly registered under certain circumstances making the panel not appear in the DevConsole. The problem, as Gert describes it, was partially fixed, but not the MBean registration part.
Geert Bevin 2010-04-30
r2368 for the MBean stuff
Himadri Singh 2010-06-24
We get ehcache panel in dev-console for programmatically create caches too.
Verified in
product-name = Ehcache Core
version = 2.2.0-SNAPSHOT
built-by = cruise
build-jdk = 1.6.0_20
build-time = 2010-06-23 03:57:20
build-revision = 2521
Sample code to reproduce it,