net.sf.ehcache.CacheException: Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand.

Terracotta Project Issue Tracker | Patrice Jaton | 7 years ago
  1. 0

    According to the Javadoc of the new cache's putWithWriter(Element) method: Put an element in the cache writing through a CacheWriter. If no CacheWriter has been set for the cache, then this method has the same effect as cache.put(). However, when using this method without having any cache writer registered, the following exception is thrown. For consistency, it seems that the putWithWriter method should act as documented as this is how the getWithLoader method will behave when no loader is registered with the cache. net.sf.ehcache.CacheException: Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand. at net.sf.ehcache.Cache.initialiseCacheWriterManager(Cache.java:1033) at net.sf.ehcache.Cache.putInternal(Cache.java:1165) at net.sf.ehcache.Cache.putWithWriter(Cache.java:1160) at com.localmatters.ds.dao.terracotta.ehcache.EhcacheWithWriteBehind.save(EhcacheWithWriteBehind.java:29) at com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:27) at com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35) at $Proxy37.save(Unknown Source) at com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitorDomain(VisitorDaoCache.java:196) at com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitor(VisitorDaoCache.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35) at $Proxy38.saveVisitor(Unknown Source) at com.localmatters.ds.persistence.DefaultPersistenceControllerImpl.saveVisitor(DefaultPersistenceControllerImpl.java:183) at com.localmatters.ds.service.DefaultVisitorDomainServiceImpl$2.doInTemplate(DefaultVisitorDomainServiceImpl.java:148) at com.localmatters.mvc.domain.DomainTemplate.execute(DomainTemplate.java:48) ... 69 more

    Terracotta Project Issue Tracker | 7 years ago | Patrice Jaton
    net.sf.ehcache.CacheException: Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand.
  2. 0

    According to the Javadoc of the new cache's putWithWriter(Element) method: Put an element in the cache writing through a CacheWriter. If no CacheWriter has been set for the cache, then this method has the same effect as cache.put(). However, when using this method without having any cache writer registered, the following exception is thrown. For consistency, it seems that the putWithWriter method should act as documented as this is how the getWithLoader method will behave when no loader is registered with the cache. net.sf.ehcache.CacheException: Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand. at net.sf.ehcache.Cache.initialiseCacheWriterManager(Cache.java:1033) at net.sf.ehcache.Cache.putInternal(Cache.java:1165) at net.sf.ehcache.Cache.putWithWriter(Cache.java:1160) at com.localmatters.ds.dao.terracotta.ehcache.EhcacheWithWriteBehind.save(EhcacheWithWriteBehind.java:29) at com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:27) at com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35) at $Proxy37.save(Unknown Source) at com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitorDomain(VisitorDaoCache.java:196) at com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitor(VisitorDaoCache.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35) at $Proxy38.saveVisitor(Unknown Source) at com.localmatters.ds.persistence.DefaultPersistenceControllerImpl.saveVisitor(DefaultPersistenceControllerImpl.java:183) at com.localmatters.ds.service.DefaultVisitorDomainServiceImpl$2.doInTemplate(DefaultVisitorDomainServiceImpl.java:148) at com.localmatters.mvc.domain.DomainTemplate.execute(DomainTemplate.java:48) ... 69 more

    Terracotta Project Issue Tracker | 7 years ago | Patrice Jaton
    net.sf.ehcache.CacheException: Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand.
  3. 0

    5 minutes with – Spring Cache | Tech Annotation

    wordpress.com | 9 months ago
    net.sf.ehcache.CacheException: Illegal configuration. No default cache is configured.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    File upload error - ehcache (Roller 4.1, GF 3.1)

    roller-user | 4 years ago | Simon Haslam
    net.sf.ehcache.CacheException: userCache Cache: The Disk store is not active.
  6. 0

    Element <cache> does not allow attribute "maxElementsOnDisk"

    Terracotta | 7 years ago | avarg
    net.sf.ehcache.CacheException: Error configuring from file:/C://ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null:295: Element does not allow attribute "maxElementsOnDisk".

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.ehcache.CacheException

      Cache: visitorDomain was being used with cache writer features, but it wasn't properly registered beforehand.

      at net.sf.ehcache.Cache.initialiseCacheWriterManager()
    2. Ehcache
      Cache.putWithWriter
      1. net.sf.ehcache.Cache.initialiseCacheWriterManager(Cache.java:1033)
      2. net.sf.ehcache.Cache.putInternal(Cache.java:1165)
      3. net.sf.ehcache.Cache.putWithWriter(Cache.java:1160)
      3 frames
    3. com.localmatters.ds
      CacheWithKeyGeneration.save
      1. com.localmatters.ds.dao.terracotta.ehcache.EhcacheWithWriteBehind.save(EhcacheWithWriteBehind.java:29)
      2. com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:27)
      3. com.localmatters.ds.dao.cache.CacheWithKeyGeneration.save(CacheWithKeyGeneration.java:14)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:592)
      4 frames
    5. com.localmatters.util
      HotSwappingInvoker.invoke
      1. com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35)
      1 frame
    6. Unknown
      $Proxy37.save
      1. $Proxy37.save(Unknown Source)
      1 frame
    7. com.localmatters.ds
      VisitorDaoCache.saveVisitor
      1. com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitorDomain(VisitorDaoCache.java:196)
      2. com.localmatters.ds.dao.cache.VisitorDaoCache.saveVisitor(VisitorDaoCache.java:179)
      2 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:592)
      4 frames
    9. com.localmatters.util
      HotSwappingInvoker.invoke
      1. com.localmatters.util.hotswap.HotSwappingInvoker.invoke(HotSwappingInvoker.java:35)
      1 frame
    10. Unknown
      $Proxy38.saveVisitor
      1. $Proxy38.saveVisitor(Unknown Source)
      1 frame
    11. com.localmatters.ds
      DefaultVisitorDomainServiceImpl$2.doInTemplate
      1. com.localmatters.ds.persistence.DefaultPersistenceControllerImpl.saveVisitor(DefaultPersistenceControllerImpl.java:183)
      2. com.localmatters.ds.service.DefaultVisitorDomainServiceImpl$2.doInTemplate(DefaultVisitorDomainServiceImpl.java:148)
      2 frames
    12. com.localmatters.mvc
      DomainTemplate.execute
      1. com.localmatters.mvc.domain.DomainTemplate.execute(DomainTemplate.java:48)
      1 frame