Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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">
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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">
Copy link to clipboard
Copied
Oh, could you please share the above output?
Copy link to clipboard
Copied
Problem solved?
Copy link to clipboard
Copied
Thanks for the assitance I was told that the team did resolve the issue, although I'm not sure what the fix was.
Copy link to clipboard
Copied
Thanks for the update.
This is a common problem, as you yourself hinted. Many, like me, would therefore be grateful if you could share your team's solution here.