我正在尝试创建一个可以将条目写入磁盘的缓存。它在我在 Windows 上的测试中运行良好,但是当我在 IBM z/OS USS 上部署它时,我最终出现以下错误。我的目录中有 0777 并且磁盘上有足够的可用空间。df -k 给我 405591/901440 的可用/总计。对我应该寻找诊断的任何见解都会有所帮助。以下是我的缓存配置-
CacheManager cacheManager = CacheManagerBuilder.newCacheManagerBuilder().with(new CacheManagerPersistenceConfiguration(new File(CACHE_DIR, "DictionaryCache")))
.withCache("dictionaryCache", CacheConfigurationBuilder.newCacheConfigurationBuilder(Integer.class, KeywordDictionary.class,
ResourcePoolsBuilder.newResourcePoolsBuilder()./*offheap(200, MemoryUnit.MB).*/disk(200, MemoryUnit.MB).heap(20, EntryUnit.ENTRIES))
.build()).build(true);
Caused by: java.lang.IllegalStateException: Cache 'dictionaryCache' creation in EhcacheManager failed.
at org.ehcache.core.EhcacheManager.createCache(EhcacheManager.java:287) ~[Classification-Engine-Scan-Job-2.0-SNAPSHOT.jar:na]
at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:566) ~[Classification-Engine-Scan-Job-2.0-SNAPSHOT.jar:na]
... 19 common frames omitted
Caused by: org.ehcache.StateTransitionException: Initial table allocation failed.
Initial Table Size (slots) : 64
Allocation Will Require : 1KB
Table Page Source : org.terracotta.offheapstore.disk.paging.MappedPageSource@e88c7380
at org.ehcache.core.StatusTransitioner$Transition.succeeded(StatusTransitioner.java:209) ~[Classification-Engine-Scan-Job-2.0-SNAPSHOT.jar:na]
at org.ehcache.core.Ehcache.init(Ehcache.java:567) ~[Classification-Engine-Scan-Job-2.0-SNAPSHOT.jar:na]
at org.ehcache.core.EhcacheManager.createCache(EhcacheManager.java:260) ~[Classification-Engine-Scan-Job-2.0-SNAPSHOT.jar:na]
... 20 common frames omitted