小编gen*_*nzo的帖子

Ehcache关闭在运行测试套件时导致异常

我遇到了以下问题.

我的项目中有一套测试服,每个测试都运行良好.

但是,当我将它们作为套件运行时,我们中的一些会因以下异常而失败:

Caused by: java.lang.IllegalStateException: The dao Cache is not alive (STATUS_SHUTDOWN)
    at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4269)
    at net.sf.ehcache.Cache.checkStatus(Cache.java:2703)
    at net.sf.ehcache.Cache.get(Cache.java:1576)
    at org.springframework.cache.ehcache.EhCacheCache.get(EhCacheCache.java:61)
    at org.springframework.cache.interceptor.CacheAspectSupport.inspectCacheables(CacheAspectSupport.java:310)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:198)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
Run Code Online (Sandbox Code Playgroud)

有没有办法避免这种行为,即在多次测试中保持缓存活着还是正确关闭?

spring ehcache spring-test junit4

16
推荐指数
1
解决办法
1万
查看次数

崩溃后无法重启eclipse

在某些时候我的eclipse崩溃了,从那一刻起我每次尝试重新启动它都会失败,我在日志中遇到以下异常:

Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
    ... 22 more
Caused by: java.lang.StackOverflowError
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:86)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
Run Code Online (Sandbox Code Playgroud)

我能够通过删除文件夹.metadata/.plugins/org.eclipse.core.resources来解决这个问题,但是这样我就失去了所有的运行历史,我想恢复它.是否有更具体的文件我可以删除来​​解决这个问题?

java eclipse stack-overflow

4
推荐指数
1
解决办法
1046
查看次数

标签 统计

eclipse ×1

ehcache ×1

java ×1

junit4 ×1

spring ×1

spring-test ×1

stack-overflow ×1