"Could not find the ColdFusion component or interface" error message

601 views
Skip to first unread message

jarthel

unread,
Oct 29, 2009, 11:02:21 PM10/29/09
to ColdSpring-Users
I have been getting this error:
------
Bean creation exception in models.database_error_logsDAO
Could not find the ColdFusion component or interface /Volumes/vill0042-
osx/Documents/work/htdocs/flinders/webapps/edss/models/
database_error_logsDAO.cfc.:Ensure that the name is correct and that
the component or interface exists.:
----

I searched the net and in some cases it could have something to do
with mappings. The only mappings that I have are in my
application.cfc:
----
<cfset currentPath = ExpandPath(".") />
<cfset this.mappings["/coldspring"] = currentPath & Iif(Find("/",
currentPath), DE("/"), DE("\")) & "coldspring" />
<cfset this.mappings["/MachII"] = currentPath & Iif(Find("/",
currentPath), DE("/"), DE("\")) & "MachII">
<cfset this.mappings["/MachIIDashboard"] = currentPath & Iif(Find
("/", currentPath), DE("/"), DE("\")) & "MachIIDashboard">
<cfset this.mappings["/models"] = currentPath & Iif(Find("/",
currentPath), DE("/"), DE("\")) & "models">
----

and this results to (emailed the dump of this.mappings struct to
myself) to:
------
struct
/MachII /Volumes/vill0042-osx/Documents/work/htdocs/flinders/webapps/
edss/MachII
/MachIIDashboard /Volumes/vill0042-osx/Documents/work/htdocs/flinders/
webapps/edss/MachIIDashboard
/coldspring /Volumes/vill0042-osx/Documents/work/htdocs/flinders/
webapps/edss/coldspring
/models /Volumes/vill0042-osx/Documents/work/htdocs/flinders/webapps/
edss/models
------

Any ideas on to make it disappears?

I've tried:
1. reducing the offending CFC to just the init function

2. using full CFC path (i.e.
flinders.webapps.edss.models.database_error_logsDAO)

3. checked if the service CFC is the cause. (i.e. removed lines that
needs the DAO) and the loading a the service bean creates no problem

Thank you.

jarthel

unread,
Oct 29, 2009, 11:06:27 PM10/29/09
to ColdSpring-Users
I forgot to say that I'm using CF9 (when I setup my new mbp, only cf9
download was available) AND I do not my own mappings defined in the CF
admin. Only the built-in ones (cfide and something about gateway) are
there.

thanks again

Chris Blackwell

unread,
Oct 30, 2009, 10:27:24 AM10/30/09
to coldspri...@googlegroups.com
wow, thats a whole lot of IIF & DE headache isn't it!  have you done that to accomodate the different path seperators on linux and windows systems??  If so theres no need - use "/" everywhere

you don't want to use expandpath(".") here, because if you're executing a file in a subdirectory i don't believe that will give you the correct result.

heres what works for me

<cfset appRoot = getDirectoryfromPath(getcurrentTemplatePath()) />
<cfset this.mappings["/coldspring"] = appRoot & "/coldspring" />


2009/10/30 jarthel <jar...@gmail.com>

jarthel

unread,
Nov 1, 2009, 9:37:47 PM11/1/09
to ColdSpring-Users
dev box = windows
uat server = linux
prod server = linux.

make it easy for me as I do not have to change anything I transfer the
files. :)

Well, I'll try your suggestion in getting the current path.

Thank you

On Oct 31, 12:27 am, Chris Blackwell <ch...@team193.com> wrote:
> wow, thats a whole lot of IIF & DE headache isn't it!  have you done that to
> accomodate the different path seperators on linux and windows systems??  If
> so theres no need - use "/" everywhere
>
> you don't want to use expandpath(".") here, because if you're executing a
> file in a subdirectory i don't believe that will give you the correct
> result.
>
> heres what works for me
>
> <cfset appRoot = getDirectoryfromPath(getcurrentTemplatePath()) />
> <cfset this.mappings["/coldspring"] = appRoot & "/coldspring" />
>
> 2009/10/30 jarthel <jart...@gmail.com>

Gavin Baumanis

unread,
Nov 2, 2009, 3:25:29 AM11/2/09
to coldspri...@googlegroups.com
I could be a little "cheeky" and suggest you also develop with linux!
You could run a little vmware/virtual box for development?


Gavin.
>>> <cfset this.mappings["/coldspring"] = currentPath & Iif(Find
As always, please contact me if I can be of any further assistance.



Gavin "Beau" Baumanis
Senior Application Developer
PalCare P/L

657 Nicholson Street
Carlton North
Victoria, Australia, 3054

E: be...@palcare.com.au
P: +61 -3 9380 3513
M: +61 -438 545 586
W: http://www.palcare.com.au

Brian Kotek

unread,
Nov 2, 2009, 10:56:55 AM11/2/09
to coldspri...@googlegroups.com
Please check that the path is definitely correct and exists (try using FileExists()), and check that the spelling and case of the path you're generating is exactly correct (Linux is case-sensitive for paths/file names).

jarthel

unread,
Nov 4, 2009, 6:53:01 PM11/4/09
to ColdSpring-Users
well the error is happening in my windows dev box so case-sensitivity
has no effect. :)

I've double-checked the file name several times (copy and paste path
and filename from explorer) explorer several times without any luck.

On Nov 3, 1:56 am, Brian Kotek <brian...@gmail.com> wrote:
> Please check that the path is definitely correct and exists (try using
> FileExists()), and check that the spelling and case of the path you're
> generating is exactly correct (Linux is case-sensitive for paths/file
> names).
>

Brian Kotek

unread,
Nov 4, 2009, 8:10:44 PM11/4/09
to coldspri...@googlegroups.com
On Wed, Nov 4, 2009 at 6:53 PM, jarthel <jar...@gmail.com> wrote:

well the error is happening in my windows dev box so case-sensitivity
has no effect. :)

It bites some people so it was worth a try.
 

I've double-checked the file name several times (copy and paste path
and filename from explorer) explorer several times without any luck.


Understood, but that doesn't really make a difference. Did you actually use the mapping and check that *CF* can get to the file, using FileExists()? Also, try using the mapping you're creating to create the CFC directly, using CreateObject(). It will most likely fail, which will indicate that the issue is definitely with the mapping or with CF's ability to get to the file (possibly for permissions or network reasons). It will also confirm that the issue is independent of your usage of ColdSpring.
 

rex

unread,
Nov 4, 2009, 8:01:21 PM11/4/09
to coldspri...@googlegroups.com
does the file "/Volumes/vill0042-osx/Documents/work/htdocs/flinders/webapps/edss/models/database_error_logsDAO.cfc" exist in that path?  I bet a million dollars that it doesn't.  Since you are on your windows dev box, this path will definitely not work since your path is a unix path.  Copying and pasting only the filename will work, but its because you are on a different path.  You are actually checking for the file database_error_logsDAO.cfc at C:\whatever\path\it\is\really\on

Also, THIS.mappings only work in the pseudo constructor of  Application.cfc, so make sure that is there.  It's wierd since you are dynamically generating the path of the mapping, so it should generate something like "C:\your_path\models", but it's seeing expandPath() as "/Volumnes/vill0042-osc" etc so I guess you are emailing us mixed messages from your different environments (like why would you email a cfdump of THIS.mappings to yourself?) 

I think the error message is on your prod/uat server and you are trying to troubleshoot on your dev box.  You should check on that server (prod/uat) for the file "database_error_logsDAO.cfc", then try doing a CF Admin mapping for /models to that file's path, and see if it works (it should, by the way ;-).  And also, check for case-sensitivity, since the error is in a linux environment
Reply all
Reply to author
Forward
0 new messages