getCacheHits not found

Hi,

I’m working with Coldbox 4.3 and have installed version 1.6 of the debugger module.

I have also defined 3 caches using the syntax below in my CacheBox.cfc

The debugger loads without error for the “defaultCache”. However when I try to change to one of the other caches I see the following error.

“The getCacheHits method was not found. Either there are no methods with the specified method name and argument types or the getCacheHits method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.”

I’ve done a search of my workspace and the function getCacheHits is not defined anywhere in the framework.
Is this a bug or am I missing something?

regards.
Michael

component{

/**

  • Configure CacheBox for ColdBox Application Operation
    */
    function configure(){

// The CacheBox configuration structure DSL
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 = 5,
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.CFColdboxProvider”,
properties = {
clearOnFlush=true,
diskPersistent=true,
maxElementsInMemory=500,
maxElementsOnDisk=3000,
memoryEvictionPolicy=‘LFU’,
overflowToDisk=true
}
}

Ooops. Sorry, I forgot to post my data in the subject line!

The cause of the error might be engine specific. If you use Lucee, I believe you should enable EHCache from the Admin. It’s just a wild guess.

Please show the actual stack trace of the error. I’m fairly certain we’re using a Java method that’s built into the internal caching mechanism and it’s not present on your CF Engine. Can you put in a ticket with all the details including the stack trace?

https://ortussolutions.atlassian.net/browse/COLDBOX

Also, you might want to test it on ColdBox 5 just in case Luis has done any work on that.

Thanks!

~Brad

Tag context is below. We are using Adobe CF2016 with the latest updaters and coldbox-4.3.0+188-201610191237

Seems to be a bug. By changing the following 3 functions in providers/cf-lib/CFStats.cfc to the following I was able to get it to work on an interim basis

The dump at line 51 in my screenshot shows that getCacheStats() delivers the functions with the names I have inserted. Looks to be an implemention problem with the EHCache specific methods as best as I can make out.

Thanks for your help!

coldfusion.runtime.java.MethodSelectionException: The getCacheHits method was not found.
at coldfusion.runtime.java.ObjectHandler.findMethodUsingCFMLRules(ObjectHandler.java:383)
at coldfusion.runtime.StructBean.invoke(StructBean.java:524)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3166)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3074)
at cfCFStats2ecfc613442819$funcGETHITS.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\cache\providers\cf-lib\CFStats.cfc:52)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3542)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3522)
at cfCFStats2ecfc613442819$funcGETCACHEPERFORMANCERATIO.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\cache\providers\cf-lib\CFStats.cfc:22)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:650)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:439)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:409)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3097)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3074)
at cfCacheReport2ecfm2021787290.runPage(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\cache\report\skins\default\CacheReport.cfm:18)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
at cfReportHandler2ecfc946562757$funcRENDERCACHEREPORT.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\cache\report\ReportHandler.cfc:110)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:464)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3019)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2994)
at cfmonitor2ecfm2059228375.runPage(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\cache\report\monitor.cfm:78)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:56)
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:332)
at cfcachestats2ecfm745076969.runPage(D:\InetPub\dev2\app\xxx\yyy\views\main\cachestats.cfm:17)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
at cfRenderer2ecfc1758684095$funcRENDERVIEWCOMPOSITE.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\web\Renderer.cfc:362)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3542)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3522)
at cfRenderer2ecfc1758684095$funcRENDERVIEW.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\web\Renderer.cfc:248)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3542)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3522)
at cfMain2ecfm1017781505.runPage(D:\InetPub\dev2\app\xxx\yyy\layouts\Main.cfm:79)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
at cfRenderer2ecfc1758684095$funcRENDERVIEWCOMPOSITE.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\web\Renderer.cfc:362)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
at cfRenderer2ecfc1758684095$funcRENDERLAYOUT.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\web\Renderer.cfc:519)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:464)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3019)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2994)
at cfBootstrap2ecfc1408911073$funcPROCESSCOLDBOXREQUEST.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\Bootstrap.cfc:219)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3542)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3522)
at cfBootstrap2ecfc1408911073$funcONREQUESTSTART.runFunction(D:\InetPub\dev2\app\xxx\yyy\coldbox\system\Bootstrap.cfc:360)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:650)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:439)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:409)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3097)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3074)
at cfApplication2ecfc1850498186$funcONREQUESTSTART.runFunction(D:\InetPub\dev2\app\xxx\yyy\Application.cfc:62)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:650)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:439)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:409)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:114)
at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:285)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:473)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:153)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:763)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:351)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:214)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:800)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:507)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)