EHCache error on looking up by cache key

房东的猫 提交于 2019-12-06 09:56:10

Given the stack trace, it seems that the calling thread is seeing a Cache with a null MemoryStore (which shouldn't be possible). I have a sneaking suspicion that this might be a memory visibility issue in either the CacheManager creation code (double-checked locking) or the Cache itself. We've tightened up a lot of those field visibility issues for Ehcache 1.7.1 (not out yet but in a few weeks).

That makes it hard to give a definite fix but one crappy idea would be to add some spring initialization that guaranteed early during startup that only one thread constructed the CacheManager. If that made the problem go away, it would lend some credence to the above theory.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!