I am seeing an issue with ColdBox-3.8.1 and using DiskStore or JDBCStore as the CacheBox objectStore. I am on Windows 2012 R2 and CF11 Update 4.
Using ConcurrentSoftReferenceStore works fine it is just the others that do not. Here are the errors I am seeing for DiskStore (I get similar ones for JDBCStore):
LogBox:
Error creating object store: coldbox.system.cache.store.DiskStore
<?xml version="1.0" encoding="UTF-8"?>CF Application.log
Error creating object store coldbox.system.cache.store.DiskStoreParameter validation error for serialize function. The function allows 3 parameters, but found 1. coldfusion.compiler.MethodArgumentMismatchException: Parameter validation error for serialize function. at coldfusion.compiler.ASTruntimeCall.findMethod(ASTruntimeCall.java:242) at coldfusion.compiler.ASTruntimeCall.getMethod(ASTruntimeCall.java:182) at coldfusion.compiler.ASTruntimeCall.setMethod(ASTruntimeCall.java:148) at coldfusion.compiler.ExprVisitor.call(ExprVisitor.java:580) at coldfusion.compiler.ExprVisitor.transform(ExprVisitor.java:83) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:100) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:82) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27) at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:459) at coldfusion.compiler.NeoTranslator.translateJava(N… The specific sequence of files included or processed is: D:\Websites\Default\index.cfm, line: 164
CF Error displayed when initializing the framework:
# Error creating object store coldbox.system.cache.store.DiskStore Parameter validation error for serialize function. The function allows 3 parameters, but found 1. coldfusion.compiler.MethodArgumentMismatchException: Parameter validation error for serialize function. at coldfusion.compiler.ASTruntimeCall.findMethod(ASTruntimeCall.java:242) at coldfusion.compiler.ASTruntimeCall.getMethod(ASTruntimeCall.java:182) at coldfusion.compiler.ASTruntimeCall.setMethod(ASTruntimeCall.java:148) at coldfusion.compiler.ExprVisitor.call(ExprVisitor.java:580) at coldfusion.compiler.ExprVisitor.transform(ExprVisitor.java:83) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:100) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:82) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27) at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27) at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:459) at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:391) at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:160) at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:461) at coldfusion.util.LruCache.get(LruCache.java:180) at
Researching this, I found some past references to a serialization issue in CF11 but that looks like it was resolved last year. So far I have only tried ConcurrentSoftReferenceStore, DiskStore, and JDBCStore, and as mentioned, ConcurrentSoftReferenceStore works fine. I searched the ColdBox codebase and the only reference to serialize() is related to Railo, which should also be fine.
Here is the snippet from my CacheBox.cfc
Data2 = {
provider = “coldbox.system.cache.providers.CacheBoxColdBoxProvider”,
properties = {
objectDefaultTimeout = 30,
objectDefaultLastAccessTimeout = 30,
useLastAccessTimeouts = true,
freeMemoryPercentageThreshold = 0,
reapFrequency = 5,
evictionPolicy = “LRU”,
evictCount = 2,
maxObjects = 300,
objectStore = “DiskStore”,
directoryPath = “#getDirectoryFromPath(getCurrentTemplatePath())#…/diskStore”,
autoExpandPath = false
}
},
Data3 = {
provider = “coldbox.system.cache.providers.CacheBoxColdBoxProvider”,
properties = {
objectDefaultTimeout = 30,
objectDefaultLastAccessTimeout = 30,
useLastAccessTimeouts = true,
freeMemoryPercentageThreshold = 0,
reapFrequency = 5,
evictionPolicy = “LRU”,
evictCount = 2,
maxObjects = 300,
objectStore = “JDBCStore”,
DSN = “cacheDSN”,
table = “cacheData”
}
},
Is anyone else seeing this issue? Thanks.
-Daniel