ColdBox 3.7.0 Railo "Error creating eviction policy: LRU"

I’ve been migrating some apps to Railo and just tried to migrate a CB one, but it seems I hit a snag. I tried googling this error but nothing helpful came up:

Obviously has to due with the cachebox config, so here is mine (completely stock from the Advanced ApplicationTemplates):

cacheBox = {
// LogBox config already in coldbox app, not needed
// logBoxConfig = “coldbox.system.web.config.LogBox”,

// The defaultCache has an implicit name “default” which is a reserved cache name
// It also has a default provider of cachebox which cannot be changed.
// All timeouts are in minutes
defaultCache = {
objectDefaultTimeout = 120, //two hours default
objectDefaultLastAccessTimeout = 30, //30 minutes idle time
useLastAccessTimeouts = true,
reapFrequency = 2,
freeMemoryPercentageThreshold = 0,
evictionPolicy = “LRU”,
evictCount = 1,
maxObjects = 300,
objectStore = “ConcurrentStore”, //guaranteed objects
coldboxEnabled = true
},

// Register all the custom named caches you like here
caches = {
// Named cache for all coldbox event and view template caching
template = {
provider = “coldbox.system.cache.providers.CacheBoxColdBoxProvider”,
properties = {
objectDefaultTimeout = 120,
objectDefaultLastAccessTimeout = 30,
useLastAccessTimeouts = true,
freeMemoryPercentageThreshold = 0,
reapFrequency = 2,
evictionPolicy = “LRU”,
evictCount = 2,
maxObjects = 300,
objectStore = “ConcurrentSoftReferenceStore” //memory sensitive
}
}
}
};

Could anyone point me in the right direction? (Should I be posting this on the Railo group?)

That error means that CacheBox couldn’t find that file.

This function is what resolves the “LRU” text to the full component path of the CFC.

if( fileExists( expandPath("/coldbox/system/cache/policies/#arguments.policy#.cfc") ) ){ return "coldbox.system.cache.policies.#arguments.policy#"; } return arguments.policy;

Put in a dump and abort and confirm that the fileExists is returning false, and then figure out why.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Oh, another thought-- check for whitespace in the LRU string as well.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Found the function, I dumped the file path and if the file exists or not.
Exists: false
Path: /var/www/coldbox/system/cache/policies/LRU.cfc

But the file does exist, at first I thought it might be a permission issue, so I checked by logging into both the railo and apache users, both can access this file. Is there something obvious I’m missing?

Case sensitivity? Can you open that exact file path from the command line?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Not exactly, it was an apparently a bad mapping in my Application.cfc:
this.mappings["/"] = COLDBOX_APP_ROOT_PATH;

Removed that, and all seemed to work. But thanks to your tip I found it. After dumping all the paths I could think of in locateEvictionPolicy it became obvious.

Thanks Brad