RE: [coldbox:20241] "Cache template is not registered." error using fresh install running sample

I’ve seen this before and it’s always been an issue of scope widening injection. Follow the stack trace back to the object that has a reference to the cache factory. Chances are it is persisted in session or application directly which means it’s out-living WireBox’s singleton scope.
http://wiki.coldbox.org/wiki/WireBox.cfm#Scope_Widening_Injection

The solution is to not wire hard references into objects that may live longer than the framework (persist through reinits). A common example of this is a user object stored in session. Instead, autowire a provider object into the object. If you’re on the latest version of ColdBox, it should look something like this:

property name=“myCache” inject=“provider:cacheBox:myCache”;

You can then call your methods on that provider object and it will proxy them through to the current cache factory via onMissingMethod() at runtime. Alternatively, you can call myCache.get() to get the actual instance of the current cache factory, but DO NOT persist it anywhere other than a local variable.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Based on the prior responses, I indeed looked at that. But a) we’re not using Cachebox directly for anything and b) this all starts from a renderView() command.

Do you have component caching enabled by chance in the ColdFusion administrator?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

If you mean this (img), then yes!

Retesting without it. No dice. Unchecked that value, saved, restarted CF, performed my breakable scenario again – and it failed, same as before.

You may need to “clear” that cache too? Not sure though as I have been off ACF for quite sometime now and don’t recall all of the admin settings…

Gave it a shot. Cleared the component path cache, restarted CF, same results. Man…this is completely killing me. None of our devs can reinit the framework, they have to completely restart Coldfusion constantly.

When you reinit, do all requests error from then on, or only a handful during the reinit? Can you provide the full stack trace please?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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