Strange component path behavior with event gateway
ColdFusionI am working on a client project using an SMS event gateway using CF8. I had written out a proxy API to allow the SMS gateway to talk to the core application using a shared data model that is strapped together using ColdSpring. I had written a test harness cfm template during development and just kind of assumed that I could instantiate this proxy component from my event gateway without issue and carry on about my business. For some reason, however, I am seeing some behavior that I wasn't expecting. I have resolved this by way of using a ColdSpring mapping in the CF Admin. However, I am still curious why the following takes place.
Here is the general picture:
I have an app that sits in /www/myclientapp/www
The proxy components and event gateway component sit in /www/myclientapp/api/proxy and there is an Application.cfc in the "api" directory. I have a coldspring directory in both /www/myclientapp/www/coldspring and /www/myclientapp/api/proxy/coldspring.
When I run a testharness file in /www/myclientapp/api/proxy/testharness.cfm, I can instantiate the data model properly and there are no issues. However, when I talk to the event gateway component that sits in the ..../proxy directory, I get errors instantiating ColdSpring in the Application.cfc stating
"Could not find the ColdFusion Component or Interface coldspring.beans.DefaultXmlBeanFactory. --- path: /www/myclientapp/api/proxy/coldspring/beans/DefaultXmlBeanFactory.cfc".
So, digging into this a bit further I did a FileExists() test on that cfc and it returns true. HUH?
Here is my question. How can the following two statements be true:
1) FileExists(ExpandPath("coldspring/beans/DefaultXmlBeanFactory.cfc")) returns "true".
2) CreateObject("component","coldspring.beans.DefaultXmlBeanFactory") errors out with the error you see above.
Hopefully someone smarter than me can shed some light on this problem!





Loading....