rythmengine / play-rythm

yet another static template engine for play!framework based on rythm
Apache License 2.0
21 stars 9 forks source link

«The play Cache is not alive» error in Rhythm.clear() #78

Open romanesko opened 11 years ago

romanesko commented 11 years ago

Sometimes happens with no reason: but screensht

greenlaw110 commented 11 years ago

Cannot see the picture, can you put the stack trace into a gist?

sojin commented 11 years ago

Similar to what OP mentioned, I'm also getting the following error with latest Rythm (1.0-b9a) on dev mode whenever I edit-save-refresh a controller. A quick peek shows that shutdown is being called on rythmengine (if it's not null) in onConfigurationRead() and eventually tries to clear the cache. (ehache, play default).

I'm just wondering if Play already shutdown the Cache on refresh? is so do we need to call Cache.clear()?

Although its not related to this issue, "rythm.cache.prod_only" and "rythm.cache.prodOnly" being used interchangeably in RythmPlugin.java?

java.lang.IllegalStateException: The play Cache is not alive (STATUS_SHUTDOWN) at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:3946) at net.sf.ehcache.Cache.checkStatus(Cache.java:2664) at net.sf.ehcache.Cache.removeAll(Cache.java:2400) at net.sf.ehcache.Cache.removeAll(Cache.java:2386) at play.cache.EhCacheImpl.clear(EhCacheImpl.java:55) at play.cache.Cache.clear(Cache.java:208) at org.rythmengine.play.RythmPlugin$5.clear(RythmPlugin.java:312) at org.rythmengine.play.RythmPlugin$5.shutdown(RythmPlugin.java:325) at org.rythmengine.RythmEngine.shutdown(RythmEngine.java:1996) at org.rythmengine.play.RythmPlugin.onConfigurationRead(RythmPlugin.java:492) at play.plugins.PluginCollection.onConfigurationRead(PluginCollection.java:519) at play.Play.readConfiguration(Play.java:346) at play.Play.start(Play.java:476) at play.Play.detectChanges(Play.java:642) at play.Invoker$Invocation.init(Invoker.java:198) at Invocation.HTTP Request(Play!)