springcache plugin with

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

springcache plugin with

rlovtangen
Has anyone tried 1.4.0.M1 or 2.0.0.M1 with springcache plugin? I get IllegalArgumentException: LRU isn't a valid eviction policy.
Works fine in 1.3.7.

Steps to reproduce:

* grails create-app foo
* Add plugin to BuildConfig:
       compile ':springcache:1.3.1'
* Add configuration to Config.groovy:
   springcache {
        defaults {
                // set default cache properties that will apply to all caches that do not override them
                eternal = false
                diskPersistent = false
        }
        caches {
                geoRailsServiceCache {
                        memoryStoreEvictionPolicy = "LRU"
                        timeToLive = 86400 //seconds
                        maxElementsInMemory = 2000
                        overflowToDisk = true
                }
        }
   }


I found the same error message in a STS jira: https://issuetracker.springsource.com/browse/STS-1759?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel
May give some pointers to what's wrong.

Works fine if I don't set memoryStoreEvictionPolicy

This is the output I get when running grails run-app:

Grails 1.4.0.M1:

14:10.54,893 [Thread-16] ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'geoRailsServiceCache': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoRailsServiceCache': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
        at net.sf.ehcache.store.compound.impl.OverflowToDiskStore.determineEvictionPolicy(OverflowToDiskStore.java:85)
        at net.sf.ehcache.store.compound.impl.OverflowToDiskStore.create(OverflowToDiskStore.java:64)
        at net.sf.ehcache.Cache.initialise(Cache.java:1012)
        at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1010)
        at net.sf.ehcache.CacheManager.addCache(CacheManager.java:938)
        ... 5 more


Grails 2.0.0.M1

| Running Grails application
| Error 2011-08-11 14:18:23,183 [Thread-8] ERROR context.GrailsContextLoader  - Error executing bootstraps: Error creating bean with name 'geoRailsServiceCache': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
   Line | Method
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   138 | run      in java.util.concurrent.FutureTask
|   886 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run      in     ''
^   680 | run . .  in java.lang.Thread

Caused by IllegalArgumentException: LRU isn't a valid eviction policy
->>  85 | determineEvictionPolicy in net.sf.ehcache.store.compound.impl.OverflowToDiskStore
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    64 | create   in     ''
|   1012 | initialise in net.sf.ehcache.Cache
|   1010 | addCacheNoCheck in net.sf.ehcache.CacheManager
|   938 | addCache in     ''
|   303 | innerRun in java.util.concurrent.FutureTask$Sync
|   138 | run . .  in java.util.concurrent.FutureTask
|   886 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . .  in     ''
^   680 | run      in java.lang.Thread


Ronny



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email