cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: cocoon ehcache usage vs. hibernate + spring
Date Wed, 30 Aug 2006 08:18:15 GMT

> This has come up a few times before, independent of it being used in  
> hibernate's session factory.
> 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110846153823635&w=2


This problem now seems to be on the ehcache list as well:
http://sourceforge.net/mailarchive/forum.php?thread_id=30378955&forum_id=48004

I am having the "The cocoon-ehcache-X Cache is not  alive" also from time to time, but did
not have time to check when exactly it happens. 

Another problem we have with ehcache 1.2.2 is (though it might have been in there always,
because our diskPersistent between JVM restarts did not work before) that I don't know what
it does on a JVM restart. I suppose that it stores its memory store keys and disk store keys
to cocoon-ehcache-X.index on shut down, and on starting up, re-populates its cache according
that index (with the LRU and things correctly restored). We have large sites running, with
disk stores easily growing to 1 Gb in a couple of days (keeping only 1000 items in memory).
Start up takes insanely long now when the disk store is large (up to 10 min for 1 Gb disk
store). Are there other people having this problem?

Regards Ard  

> 
> Jorg
> 
> On 22 Aug 2006, at 11:08, Leszek Gawron wrote:
> 
> > It looks like cocoon ehcache based store does not live 
> happily with  
> > hibernate's session factory (spring managed):
> >
> >> 304859 [Shutdown] INFO / - Closing Spring root 
> WebApplicationContext
> >> 304859 [Shutdown] INFO  
> >> 
> org.springframework.web.context.support.XmlWebApplicationContext -  
> >> Closing application context [Root WebApplicationContext]
> >> 304859 [Shutdown] INFO  
> >> 
> org.springframework.beans.factory.support.DefaultListableBeanFactory  
> >> - Destroying singletons in  
> >> {org.springframework.beans.factory.support.DefaultL
> >> istableBeanFactory defining beans  
> >> 
> [filterChainProxy,httpSessionContextIntegrationFilter,basicProcessing 
> >> Filter,basicProcessingFilterEntryPoint,exceptionTranslationFilter,f
> >> 
> ilterSecurityInterceptor,roleVoter,accessDecisionManager,userDetailsS 
> >> 
> ervice,userCache,daoAuthenticationProvider,anonymousAuthenticationPro 
> >> vider,testingAuthenticationProvi
> >> 
> der,rememberMeAuthenticationProvider,authenticationManager,beanSecuri 
> >> 
> tyInterceptor,beanSecurityAdvisor,placeholderConfig,org.springframewo 
> >> rk.beans.factory.annotation.Requ
> >> 
> iredAnnotationBeanPostProcessor,dataSource,sessionFactory,baseHiberna 
> >> 
> teDao,transactionManager,annotationTransactionAttributeSource,transac 
> >> tionInterceptor,transactionAdvis
> >> 
> or,org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProx 
> >> 
> yCreator,clientDao,transportOrderDao,orderLogEntryDao,clientService,t 
> >> ransportOrderService,org.springf
> >> ramework.scheduling.quartz.SchedulerFactoryBean]; root of  
> >> BeanFactory hierarchy}
> >> 304859 [Shutdown] INFO  
> >> org.springframework.scheduling.quartz.SchedulerFactoryBean -  
> >> Shutting down Quartz Scheduler
> >> 304859 [Shutdown] INFO org.quartz.core.QuartzScheduler - 
> Scheduler  
> >> DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
> >> 304859 [Shutdown] INFO org.quartz.core.QuartzScheduler - 
> Scheduler  
> >> DefaultQuartzScheduler_$_NON_CLUSTERED paused.
> >> 304859 [Shutdown] INFO org.quartz.core.QuartzScheduler - 
> Scheduler  
> >> DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
> >> 304859 [Shutdown] INFO  
> >> org.springframework.orm.hibernate3.LocalSessionFactoryBean -  
> >> Closing Hibernate SessionFactory
> >> 304859 [Shutdown] INFO org.hibernate.impl.SessionFactoryImpl -  
> >> closing
> >> 304859 [Shutdown] ERROR  
> >> 
> org.springframework.beans.factory.support.DefaultListableBeanFactory  
> >> - Destroy method on bean with name 'sessionFactory' threw an  
> >> exception
> >> java.lang.IllegalStateException: The cocoon-ehcache-1 
> Cache is not  
> >> alive.
> >>         at net.sf.ehcache.Cache.checkStatus(Cache.java:1062)
> >>         at net.sf.ehcache.Cache.dispose(Cache.java:939)
> >>         at net.sf.ehcache.CacheManager.shutdown(CacheManager.java: 
> >> 538)
> >>         at org.hibernate.cache.EhCacheProvider.stop 
> >> (EhCacheProvider.java:145)
> >>         at org.hibernate.impl.SessionFactoryImpl.close 
> >> (SessionFactoryImpl.java:756)
> >>         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:585)
> >>         at  
> >> org.springframework.orm.hibernate3.LocalSessionFactoryBean 
> >> $TransactionAwareInvocationHandler.invoke 
> >> (LocalSessionFactoryBean.java:1124)
> >>         at $Proxy10.close(Unknown Source)
> >>         at  
> >> org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy 
> >> (LocalSessionFactoryBean.java:1078)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DisposableBeanAdapter.destr 
> >> oy(DisposableBeanAdapter.java:97)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroyBean(DefaultSingletonBeanRegistry.java:304)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroySingleton(DefaultSingletonBeanRegistry.java:277)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroySingletons(DefaultSingletonBeanRegistry.java:255)
> >>         at  
> >> 
> org.springframework.context.support.AbstractApplicationContext.doClos 
> >> e(AbstractApplicationContext.java:599)
> >>         at  
> >> 
> org.springframework.context.support.AbstractApplicationContext.close( 
> >> AbstractApplicationContext.java:568)
> >>         at  
> >> 
> org.springframework.web.context.ContextLoader.closeWebApplicationCont 
> >> ext(ContextLoader.java:339)
> >>         at  
> >> 
> org.springframework.web.context.ContextLoaderListener.contextDestroye 
> >> d(ContextLoaderListener.java:73)
> >>         at org.mortbay.jetty.handler.ContextHandler.doStop 
> >> (ContextHandler.java:402)
> >>         at org.mortbay.jetty.webapp.WebAppContext.doStop 
> >> (WebAppContext.java:377)
> >>         at org.mortbay.component.AbstractLifeCycle.stop 
> >> (AbstractLifeCycle.java:62)
> >>         at org.mortbay.jetty.handler.HandlerCollection.doStop 
> >> (HandlerCollection.java:118)
> >>         at org.mortbay.jetty.Server.doStop(Server.java:263)
> >>         at org.mortbay.component.AbstractLifeCycle.stop 
> >> (AbstractLifeCycle.java:62)
> >>         at org.mortbay.jetty.Server$ShutdownHookThread.run 
> >> (Server.java:520)
> >> 304859 [Shutdown] INFO  
> >> org.springframework.cache.ehcache.EhCacheManagerFactoryBean -  
> >> Shutting down EHCache CacheManager
> >> 304859 [Shutdown] ERROR  
> >> 
> org.springframework.beans.factory.support.DefaultListableBeanFactory  
> >> - Destroy method on bean with name 'cacheManager' threw an 
> exception
> >> java.lang.IllegalStateException: The cocoon-ehcache-1 
> Cache is not  
> >> alive.
> >>         at net.sf.ehcache.Cache.checkStatus(Cache.java:1062)
> >>         at net.sf.ehcache.Cache.dispose(Cache.java:939)
> >>         at net.sf.ehcache.CacheManager.shutdown(CacheManager.java: 
> >> 538)
> >>         at  
> >> 
> org.springframework.cache.ehcache.EhCacheManagerFactoryBean.destroy 
> >> (EhCacheManagerFactoryBean.java:94)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DisposableBeanAdapter.destr 
> >> oy(DisposableBeanAdapter.java:97)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroyBean(DefaultSingletonBeanRegistry.java:304)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroySingleton(DefaultSingletonBeanRegistry.java:277)
> >>         at  
> >> 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistr 
> >> y.destroySingletons(DefaultSingletonBeanRegistry.java:255)
> >>         at  
> >> 
> org.springframework.context.support.AbstractApplicationContext.doClos 
> >> e(AbstractApplicationContext.java:599)
> >>         at  
> >> 
> org.springframework.context.support.AbstractApplicationContext.close( 
> >> AbstractApplicationContext.java:568)
> >>         at  
> >> 
> org.springframework.web.context.ContextLoader.closeWebApplicationCont 
> >> ext(ContextLoader.java:339)
> >>         at  
> >> 
> org.springframework.web.context.ContextLoaderListener.contextDestroye 
> >> d(ContextLoaderListener.java:73)
> >>         at org.mortbay.jetty.handler.ContextHandler.doStop 
> >> (ContextHandler.java:402)
> >>         at org.mortbay.jetty.webapp.WebAppContext.doStop 
> >> (WebAppContext.java:377)
> >>         at org.mortbay.component.AbstractLifeCycle.stop 
> >> (AbstractLifeCycle.java:62)
> >>         at org.mortbay.jetty.handler.HandlerCollection.doStop 
> >> (HandlerCollection.java:118)
> >>         at org.mortbay.jetty.Server.doStop(Server.java:263)
> >>         at org.mortbay.component.AbstractLifeCycle.stop 
> >> (AbstractLifeCycle.java:62)
> >>         at org.mortbay.jetty.Server$ShutdownHookThread.run 
> >> (Server.java:520)
> >> [INFO] 304875 [Shutdown] INFO org.mortbay.log - Shutdown hook  
> >> complete
> >
> > Can we somehow eliminate this exception?
> >
> > -- 
> > Leszek Gawron, IT Manager                          MobileBox sp. z  
> > o.o.
> > +48 (61) 855 06 67                              http:// 
> > www.mobilebox.pl
> > mobile: +48 (501) 720 812                       fax: +48 (61) 853  
> > 29 65
> 
> 

Mime
View raw message