Solved

CreateObject and Component Explorer

Posted on 2008-10-28
4
222 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now