Skip to main content
Participant
November 19, 2021
Question

Suddenly getting dreaded "Could not find the ColdFusion component or interface"

  • November 19, 2021
  • 1 reply
  • 395 views

Coldfusion 2018, Linux server

This is on our development site but was working until last week. We've googled and see this is not uncommon and tried the suggested solutions such as creating a mapping, which seems the most popular, and a few others but nothing seems to fix the issue.

The development machine is shared so each developer is mapping their CFCs to their own unique location and each application has a unique name even on the same server, a hash is involved. 

 

When we create the Create the object

<cfobject component="/#APPLICATION.cfcroot#.Security" name="sec">

 

It seems to find the Security CFC because the error is on the "extends" attribute which is set to a CFC called Authenticate.

<cfcomponent extends="Authenticate" accessors="true" output="false" persistent="false">

 

It can't find the Authenticate CFC which is in the same directory and throws the error, "Could not find the ColdFusion component or interface var.www.html.mark.financeonline.account_services.cfcs.Authenticate". Which is the correct location just replace the dots.

 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    November 20, 2021

    Is the component path 

    "/#APPLICATION.cfcroot#.Security" ("/var.www.html.mark.financeonline.account_services.cfcs.Authenticate")

    or is it

    "#APPLICATION.cfcroot#.Security" ("var.www.html.mark.financeonline.account_services.cfcs.Authenticate")?

    What happens when you use the following:

    <cfobject component="#APPLICATION.cfcroot#.Security" name="sec">
    Participant
    November 22, 2021

    Both of the examples you gave look the same to me. I tried the line you recommended and I got the same error:

    Could not find the ColdFusion component or interface /emily/afo.Security.

    and

    Could not find the ColdFusion component or interface var.www.html.emily.afo.account_services.cfcs.Authenticate.

    BKBK
    Community Expert
    Community Expert
    November 23, 2021

    Strange indeed.

    The relative paths /emily/afo.Security and emily.afo.Security represent different notations. So, try the following test, just to rule out any differences:

    <cfoutput>	
    	APPLICATION.cfcroot: #APPLICATION.cfcroot# <br>
    	fileExists(APPLICATION.cfcroot & ".Security.cfc"): #fileExists(APPLICATION.cfcroot & ".Security.cfc")# <br>
    	fileExists("/" & APPLICATION.cfcroot & ".Security.cfc"): #fileExists("/" & APPLICATION.cfcroot & ".Security.cfc")# <br>
    	fileExists(APPLICATION.cfcroot & ".Authenticate.cfc"): #fileExists(APPLICATION.cfcroot & ".Authenticate.cfc")# <br>
    	fileExists("/" & APPLICATION.cfcroot & ".Authenticate.cfc"): #fileExists("/" & APPLICATION.cfcroot & ".Authenticate.cfc")# <br>
    	fileExists("var/www/html/mark/financeonline/account_services/cfcs/Authenticate.cfc"): #fileExists("var/www/html/mark/financeonline/account_services/cfcs/Authenticate.cfc")# <br>
    	fileExists("/var/www/html/mark/financeonline/account_services/cfcs/Authenticate.cfc"): #fileExists("/var/www/html/mark/financeonline/account_services/cfcs/Authenticate.cfc")# <br>
    	fileExists("var/www/html/mark/financeonline/account_services/cfcs/Security.cfc"): #fileExists("var/www/html/mark/financeonline/account_services/cfcs/Security.cfc")# <br>
    	fileExists("/var/www/html/mark/financeonline/account_services/cfcs/Security.cfc"): #fileExists("/var/www/html/mark/financeonline/account_services/cfcs/Security.cfc")# 	 	
    </cfoutput>
    
    <cfabort>
    
    <cfobject component="#APPLICATION.cfcroot#.Security" name="sec">