Solved

CreateObject and Component Explorer

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 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

13 Experts available now in Live!

Get 1:1 Help Now