Solved

CreateObject and Component Explorer

Posted on 2008-10-28
4
232 Views
Last Modified: 2012-06-21
given the code below i get the following message using the coldfusion component explorer (http://localhost/cfide/componentutils/componentdoc.cfm?)
Component not found
The component definition file for component 'sms_root.components.cust' cannot be found on this server.

if i remove the following line from the code
<cfset VARIABLES.objGeneralDAO=CreateObject("component", "components.generalDAO")>
then the component explorer can find the component without issue.  I am wondering why
<cfcomponent displayname="TESTCFC" extends="generalFuncs">
	<cfscript>
		init();
	</cfscript>
    
    <cffunction name="init">
    	<cfreturn this />
    </cffunction>
    
    <cfset VARIABLES.objGeneralDAO=CreateObject("component", "components.generalDAO")>
    
   
</cfcomponent>

Open in new window

0
Comment
Question by:jduawa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Andrew Maurer earned 500 total points
ID: 22825687
I think there is some confusion as to your directory structure..

CALLING THIS
<cfset VARIABLES.objGeneralDAO=CreateObject("component", "components.generalDAO")>
FROM
http://localhost/cfide/componentutils/componentdoc.cfm?
MEANS FIND YOUR COMPONENT FROM
http://localhost/cfide/componentutils/components/generalDAO.cfc

Is that were the generalDAO.cfc file is?

because your error message is looking for
sms_root/components/cust
OR
'sms_root.components.cust'
0
 
LVL 9

Expert Comment

by:Andrew Maurer
ID: 22825704
what you are using is relative paths when you do CreateObject("component", "components.generalDAO")
0
 
LVL 1

Author Comment

by:jduawa
ID: 22825714
the cfc works fine in the application just in the component explorer it flips out
0
 
LVL 1

Author Closing Comment

by:jduawa
ID: 31510907
it is indeed something with the path of that createobject code
Thanks
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question