Spring-Data-Gemfire意外"缓存已关闭。"

时间:2015-07-28 13:44:49

标签: java spring gemfire spring-data-gemfire


使用gemfire 8.1和spring-gemfire-data,版本1.5.2.RELEASE。
我得到一些孤立的错误" com.gemstone.gemfire.cache.CacheClosedException:缓存已关闭。"
哪个可能是原因?因为我不是手动做任何事情......让弹簧数据完成工作......


com.gemstone.gemfire.cache.CacheClosedException: The cache is closed.
        at com.gemstone.gemfire.internal.cache.GemFireCacheImpl$Stopper.generateCancelledException(GemFireCacheImpl.java:1294)
        at com.gemstone.gemfire.CancelCriterion.checkCancelInProgress(CancelCriterion.java:82)
        at com.gemstone.gemfire.internal.cache.TXManagerImpl.checkClosed(TXManagerImpl.java:606)
        at com.gemstone.gemfire.internal.cache.TXManagerImpl.begin(TXManagerImpl.java:279)
        at org.springframework.data.gemfire.GemfireTransactionManager.doBegin(GemfireTransactionManager.java:125)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:420)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:257)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

1 个答案:

答案 0 :(得分:0)

Seems your Stack Trace is incomplete, not revealing everything (i.e. missing "Caused By:"). Please include the entire Stack Trace.

It is difficult to determine if this is coming from within your application, or perhaps a test case. It is not likely that GemFire would "close" due to a TransactionException. So, including some configuration and the code directly involved would be helpful. Even better, a test reliably reproducing the issue is extremely helpful and preferred as that is always my first step in resolving all issues.

It is also worth noting Spring Data GemFire 1.5.x is based on GemFire 7.0.2 (https://github.com/spring-projects/spring-data-gemfire/blob/v1.5.2.RELEASE/gradle.properties#L4) and not necessarily appropriate for GemFire 8.1, although, it has been known to work in the majority of the UCs (Gateways is one exception, however).

Technically, the upcoming Spring Data GemFire 1.7.0 release (https://github.com/spring-projects/spring-data-gemfire/blob/master/gradle.properties#L3) has full support and is compatible with GemFire 8.1, although has not reached final GA yet (currently at 1.7.0 M1). The latest release with GemFire 8.0 support is Spring Data GemFire 1.6.2.RELEASE

See the Spring Data GemFire home page for more details on current releases (http://projects.spring.io/spring-data-gemfire/) and the Spring Data Wiki, "Release planning" page for release schedule (https://github.com/spring-projects/spring-data-commons/wiki/Release-planning). Note, the current, active releases, Fowler (SDG 1.6.x) and Gosling (1.7.x) are hyperlinked.

Thanks