Skip to main content
Inspiring
October 2, 2009
Question

Component not found - The component definition file for component 'tools.cfc.core' cannot be found on this server.

  • October 2, 2009
  • 1 reply
  • 2734 views

Please help with the following error. How do I fix... The CFC file is at the location specified.

Component not found

The component definition file for component 'tools.cfc.core' cannot be found on this server. 
    This topic has been closed for replies.

    1 reply

    Inspiring
    October 2, 2009

    I am guessing that your problem is on a development machine and not a live site? If that' s not the case, please post back and give a few more details on your server setup.

    In general, however, ColdFusion will take a mapping such as 'tools.cfc.core' and start looking for the component at the webroot. So, tools.cfc.core, indicates to CF that there should be a tools folder under the webroot folder. From there CF will look for a folder called cfc under tools and then it looks for the core.cfc file in the cfc folder.

    By way of example, let's say you view your site on your dev box with the URL of http://localhost/mysite.

    Along those lines, your directory structure would be something like the following:

    Webroot - c:\webroot

    Application/Site folder - c:\webroot\mysite

    Tools - c:\webroot\mysite\tools

    CFCs - c:\webroot\mysite\tools\cfc

    Core - c:\webroot\mysite\tools\cfc\core.cfc

    In such a scenario, CF won't be able to find the CFC with tools.cfc.core because there is no tools folder at the root level (it's under the mysite folder). In this case, you'd want to tell CF to look in mysite.tools.cfc.core

    Hope that helps somewhat!!

    jbreslowAuthor
    Inspiring
    October 2, 2009

    Hey Craig, thanks for the quick reply.

    The path to that CFC and the CFC folder is as follows,  http://localhost/tools/cfc/core.cfc. So, "tools.cfc.core" should be correct. We've used this elsewhere without issue.

    What kinda server details would you like to see?

    Inspiring
    October 2, 2009

    Thanks for the follow-up and clarification.

    Three questions for you:

    1. From what template are you calling the CFC, where is that template located (directory), and how do you access it in a URL?

    2. How do you instantiate your component (i.e., createObject('component', 'tools.cfc.core'), etc.)?

    3. If you navigate to http://localhost/tools/cfc/core.cfc what happens (you should be prompted to log into the ColdFusion component explorer?