Solved

CreateObject and Component Explorer

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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