Coldbox cache reap method does not work on CF9 Enterprise

Still running version 2.2.5 (I know right, but have issues everytime I try upgrading) and this bug has probably been fixed after moving to a 3.x release with cachebox.

Anyway, the fix was replacing the super.reap(); method with a local.killedThread via the admin API

coldbox/system/cache/MTCacheManager.cfc

Line 30 or 31 replace this:

super.reap();

With the fix which was

//Creating Object Of Admin and Server monitoring API local.adminObj = createobject("component","cfide.adminapi.administrator"); local.monitorObj = createobject("component","cfide.adminapi.servermonitoring");

//login to admin API
local.adminObj.login(#CFAdminPW#);

//kill the thread whose is present the argument
local.killedThread = local.monitorObj.abortCFThread(#threadName#);

//logout from admin API
local.adminObj.logout();

This was the error log entry in the instance log that repeated over and over. Memory would get eaten up and eventually the jrun.exe for the instance would reach the max heap limit and freeze up.

“Error”,“cfthread-2”,“date”,“15:55:25”,“COLDBOX.CACHE.REAP_683FBEBCE5A740BD8E04803EF175B47C: The reap method was not found. Either there are no methods with the specified method name and argument types or the reap 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.”
coldfusion.runtime.java.MethodSelectionException: The reap 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:2393)
at cfMTCacheManager2ecfc123444967$func_CFFUNCCFTHREAD_CFMTCACHEMANAGER2ECFC1234449671.runFunction(C:\inetpub\wwwroot\www\coldbox\system\cache\MTCacheManager.cfc:32)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.UDFMethod.invokeCFThread(UDFMethod.java:201)
at coldfusion.thread.Task.invokeFunction(Task.java:287)
at coldfusion.thread.Task.run(Task.java:140)
at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:211)
at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)

You are pre-CacheBox, so yes the current code is nothing at all like what you are dealing with. Our time would probably be better spent getting you up to speed on the latest version of ColdBox. Can you describe the kinds of issues you ran into. The compatibility guides for upgrading ColdBox are well-documented here:

http://wiki.coldbox.org/wiki/Dashboard.cfm#Compatibility_Guides

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Thanks Brad. The biggest issue I am having is with the model/*.cfc files

We use Transfer and lightwire with the current version and getting the new release to do the same stuff is driving me crazy.

In the new releases I can’t seem to get them to process.

My current error:

Application Execution ExceptionError Type: Expression : [N/A]

Error Messages: Element PAGEMANAGER is undefined in a Java object of type class [Ljava.lang.String;.

ID: ??
LINE: 403
Template: C:\inetpub\wwwroot\www\handlers\Content.cfc

Line 403:

I’ve tried using Wirebox to bring them in but not seeing why it’s not working.

This is in wirebox.cfc which is in the root\config folder

// Map Bindings below
mapPath(“model.pageManager”);

Line 403 is your problem

My guess as the error states, your variables scope has a reference to a string and not an object.

Can you show us how you are injecting the pageManager object? The easiest way to do it is with a cfproperty at the top of the target component.

component {
property name=“pageService” inject;

function doSomething() {
pageService.foobar();
}

}

Also, make sure you reinit after making changes.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

The version we are running uses the xml configuration. Figuring out how to do the same in the config/coldbox.cfc with built in wirebox and an OIC has had me spending way too much time to mess with much longer.

Current production configuration
Here in coldbox.xml.cfm is where lightwire and transfer is setup.

config.LightWire

the Page Manager is setup using lightwire.cfc

config/Lightwire.cfc

// Page Manager
addSingleton("#cfcModelRoot#.model.managers.pageService",“pageManager”);
addConstructorDependency(“PageManager”,“transfer”,“transfer”);
addConstructorProperty(“PageManager”,“coldbox”,getController() );

The pageManager model has a function called getPageID. That value is not being set because the pageManager model is never loading.

Select pageID from cmsWebSite where pageSEOurl = '#[arguments.id#](http://arguments.id#)' pageID = getPageIDbySEOURL.pageID;

BTW, I also ended up just changing the MTCacheManager.cfc file to the most recent version of the coldbox that used it. That seems to work better than my hack. Version 2.6.4