版本 是 spring2.0.3 ehcache1.2.4
目前只在 但愿测试的时候 碰到过 也就是 单元测试结束 销毁方法的时候 掉用 CacheManager.removeShutdownHook 时候 错显得错误。 还没有 搞清楚 是 为什么。去 看了他的 maillist发现 appfuse的作者 mat也 发现了这个错误 。
java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55)
at java.lang.Runtime.removeShutdownHook(Runtime.java:220)
at net.sf.ehcache.CacheManager.removeShutdownHook(CacheManager.java:524)
at net.sf.ehcache.CacheManager.shutdown(CacheManager.java:711)
at org.hibernate.cache.EhCacheProvider.stop(EhCacheProvider.java:158)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:798)
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:597)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean$TransactionAwareInvocationHandler.invoke(AbstractSessionFactoryBean.java:313)
at $Proxy16.close(Unknown Source)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:193)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:854)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:145)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:308)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:282)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:656)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:634)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:571)
回复 更多评论