"Cache template is not registered." error using fresh install running sample

Here is what it is running on:

  • Windows Server 2003 (32 bit)
  • IIS 6.0
  • ColdFusion 8.0 (Installed using JRun)
  • ColdBox 3.1.0 (Installed at C:\Inetpub\wwwroot\coldbox)

My problem is frustrating. I haven’t written a single line of code to integrate ColdBox into my application. I simply unzipped the coldbox archive to my webroot and tried to view/run the included samples. I did so by opening a browser and going to following URL: http://127.0.0.1/coldbox/samples/

Upon doing so I get the following error which worries me seeing that this is code that is coming WITH the framework and nothing that I have written.

Cache template is not registered.

Valid cache names are

The error occurred in C:\Inetpub\wwwroot\coldbox\system\cache\CacheFactory.cfc: line 191
Called from C:\Inetpub\wwwroot\coldbox\system\web\Controller.cfc: line 131
Called from C:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 186
Called from C:\Inetpub\wwwroot\coldbox\samples\Application.cfc: line 52

Can someone help explain why this is happening and how to get rid of it so I can run the included samples before I start doing any migration of our applications to this framework?

-Kevin

I believe this post was moderated. Can we catch up on this. Are you still having this issue Kevin?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Yes I am still having this issue.

-K

Have you tried version 3.5?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

No I have not.

The reason for not doing so was because of the need to migrate existing applications (as well as simply learn). The hope was to minimize the amount of issues (and changes) that come with beta releases.

I will verify your issues then. I am installing cf 801 now.

Can anybody confirm his issues,

FYI - I downloaded ColdBox 3.5, unzipped and ran the samples directory and got a different error (shown below).

Missing argument name.

When using named parameters to a function, every parameter must have a name.

The CFML compiler was processing:

An expression beginning with wirebox.getBinder, on line 69, column 33.This message is usually caused by a problem in the expressions structure.
A script statement beginning with wirebox.getBinder on line 69, column 33.
A script statement beginning with { on line 68, column 98.
A script statement beginning with if on line 68, column 25.
A cfscript tag beginning on line 60, column 10.
A cfscript tag beginning on line 60, column 10.

The error occurred in C:\Inetpub\wwwroot\coldbox\system\web\services\InterceptorService.cfc: line 69
Called from C:\Inetpub\wwwroot\coldbox\system\web\Controller.cfc: line 57
Called from C:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 69
Called from C:\Inetpub\wwwroot\coldbox\samples\Application.cfc: line 35

67 : 			// Check if base interceptor mapped, else map it
68 : 			if( NOT wirebox.getBinder().mappingExists("coldbox.system.Interceptor") ){
**69 : 				wirebox.getBinder().map("coldbox.system.Interceptor").to("coldbox.system.Interceptor").initWith(controller=controller,properties={}).noAutowire();**
70 : 			}
71 : 			// Register CFC Configuration Object

Looks like the issue is with the properties argument being defaulted in using {} which is not something CF8 knows about. Is CF8 supported with ColdBox 3.5? What about 3.1?

Not sure if it makes any difference but I am running CF 8 with JRun (enterprise obviously)

-K

Kevin, the bug with 3.5 was reported in the beta and fixed already for cf8 compatibility. Of course, due to the way cf8 treated implicit structures, which was crappy.

I also installed a fresh copy of cf8 and downloaded 3.1 bundle. Deployed it and all the application templates run plus the samples gallery. I cannot reproduce your error for some reason. 3.1 is supposed to be cf8 compatible fully, even the samples, so not sure what you get. Am I missing something.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Perhaps my install is missing a hot fix of some kind.

What CF8 system did you install and test it on? Standalone, JRun, internal web server, etc?

-K

I installed it on jrun latest download from adobe

We’re having this same problem, and have been for a couple of weeks. I’ve been tasked with getting in there and solving it.

I can say this: It happens after a reinit. I got the logging turned on with logbox, down to debug details. Filtering our for just cacheFactory, you can see these lines from the (filtered) log:

“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:00”,“coldbox.system.cache.CacheFactory”,“Cache Registered: default requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:00”,“coldbox.system.cache.CacheFactory”,“Cache Created: default requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:00”,“coldbox.system.cache.CacheFactory”,“Cache Registered: TEMPLATE requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:00”,“coldbox.system.cache.CacheFactory”,“Cache Created: TEMPLATE requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:00”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:10”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:10”,“coldbox.system.cache.CacheFactory”,“Cache: template requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:11”,“coldbox.system.cache.CacheFactory”,“Cache: template requested on factoryID: 1663791523.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:00:15”,“coldbox.system.cache.CacheFactory”,“Cache: template requested on factoryID: 1663791523.”
[50 lines removed, similar, same factory class ID]
[Reinit happened here]
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache: TEMPLATE removed from factory: 1663791523”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“All caches removed.”
“INFO”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Shutdown of cache factory: 1663791523 completed.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache: default removed from factory: 1663791523”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache: default asked to be removed from factory: 1663791523”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache Registered: default requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache Created: default requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache Created: TEMPLATE requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache Registered: TEMPLATE requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:02:53”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 860341900.”
[45 lines removed]
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:13:25”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:13:25”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:13:25”,“coldbox.system.cache.CacheFactory”,“Cache: default requested on factoryID: 860341900.”
“DEBUG”,“MYASYNCFILE”,“12/02/2013”,“17:13:25”,“coldbox.system.cache.CacheFactory”,“Cache: template requested on factoryID: 1663791523.

Note the old class ID is being used here. (I added the “cache requested” logging entry.) But the cacheFactory with that ID was shutdown already. Something inside Coldbox has a stale reference maybe?

This is the partial stack trace information, starting with a renderView() command inside one of my handlers. (Luis, this is version 3.6. But not the latest download. However, I did swap out for the latest download and received the same issue.)

RAW_TRACE at cfCacheFactory2ecfc824566027$funcGETCACHE.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\cache\CacheFactory.cfc:198)
RAW_TRACE at cfController2ecfc175370189$funcGETCOLDBOXOCM.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\web\Controller.cfc:157)
RAW_TRACE at cfRenderer2ecfc538678822$funcINIT.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\plugins\Renderer.cfc:37)
RAW_TRACE at cfBuilder2ecfc1539057734$funcBUILDCFC.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\ioc\Builder.cfc:111)
RAW_TRACE at cfInjector2ecfc1611989253$funcBUILDINSTANCE.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\ioc\Injector.cfc:286)
RAW_TRACE at cfNoScope2ecfc1261465596$funcGETFROMSCOPE.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\ioc\scopes\NoScope.cfc:31)
RAW_TRACE at cfInjector2ecfc1611989253$funcGETINSTANCE.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\ioc\Injector.cfc:260)
RAW_TRACE at cfPluginService2ecfc342551413$funcNEW.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\web\services\PluginService.cfc:137)
RAW_TRACE at cfPluginService2ecfc342551413$funcGET.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\web\services\PluginService.cfc:153)
RAW_TRACE at cfController2ecfc175370189$funcGETPLUGIN.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\web\Controller.cfc:371)
RAW_TRACE at cfFrameworkSupertype2ecfc77403198$funcRENDERVIEW.runFunction(C:\Development\Sandbox\6.12\Global\ThirdPartyTools\Coldbox\3.6\system\FrameworkSupertype.cfc:168)

Will,

The identity code is never guaranteed to be unique per instance. As per the JDK docs:

Multiple objects can have the same identity hash code. That is the nature of hash codes. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6321873

The factory ID uses the following for its ID:
factoryID = createObject(‘java’,‘java.lang.System’).identityHashCode(this),

So the JVM could potentially reuse that address in memory to give you the same hash code.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

You say they aren’t unique. That’s not the issue. There are TWO cacheFactory objects living.

My point about that is that when you reinit, all the cache objects are removed from instance 1 of cacheFactory. Then instance 2 of cacheFactory is built. But this particular operation goes back to instance 1 to look for the cache items. Why does it go back to instance 1? How does it even have a pointer to that one?

Shouldn’t the controller only have ONE instance of cacheFactory at a given time? It seems that somewhere deep in the inner workings that some Coldbox object isn’t getting a replacement cacheFactory. It should have the current one, not the old one.

That’s the problem we have. Because it has the old one, but all the cache items have been shut down, then of course it’s going to throw an error.

I do not really follow you. If you reinit, the entire application scope is removed of the instance. So if something is alive then check if you do manually scoped objects.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano