My best blogging years were when I worked in ColdFusion Technical Support, from Allaire and right on thru Macromedia then Adobe. Constantly fielding customer questions provided an endless source of fodder to investigate and blog about when a solution or workaround was found. It feels a little like old times again now that my QA team is expanding and I've been helping others come up to speed with our ColdFusion driven Automated Test Suite. Although my colleagues are experienced web professionals, I'm happy there is room for mentoring in ColdFusion, and that provides me with more fodder to share here.

After helping someone install ColdFusion 9.0 and apply the 9.01 updater, they reported the updater failed to complete. We cleaned things up a bit, confirmed installers, and tried again. Success. Shortly after, we continued setting up the test suite environment they reported a very unusual error that I'd never seen before, Could not find the ColdFusion component or interface Query. With a bit of Googling, I found that there were only 2 hits, and one was in a comment on Ben Nadel's blog where he provided the winning hint. The other hit was a tweet about it when someone else encountered this issue.

Per Ben's hint, I had my colleague check the CF Admin's Custom Tag mappings, and the source of the problem was immediately evident. The core mapping for "C:ColdFusion9CustomTags" was missing. Prior to then, I thought this mapping was immutable by the end user of the CF Admin. Perhaps it was due to the initial failed 9.01 updater, I'm not really sure how that mapping got wiped out, but as soon as we restored it, everything worked.

The mapping is needed because some parts of the Core CFML language are implemented as custom tags stored in that core location. This includes the query.cfc tag, which implements the script-based version of CFQuery. Without that mapping, there will be several language areas that won't work.

For completeness, here's the top of the stack trace for this issue encountered when executing a simple: myQuery = new Query();



view plain print about
1"Error","web-0","03/30/12","15:46:05","UITests_Migration_Accounting","Could not find the ColdFusion component or interface Query.Ensure that the name is correct and that the component or interface exists. The specific sequence of files included or processed is: C:path    omyappindex.cfm, line: 60 "
2coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion component or interface Query.
3 at coldfusion.runtime.TemplateProxyFactory.getResolvedFile(TemplateProxyFactory.java:1311)
4 at coldfusion.runtime.TemplateProxyFactory.getTemplateFileHelper(TemplateProxyFactory.java:1526)
5 at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:51)
6 at coldfusion.runtime.CFPage.___createObjectInternal(CFPage.java:8590)
7 at coldfusion.runtime.CFPage._createObject(CFPage.java:8577)