?
Solved

CreateObject and Component Explorer

Posted on 2008-10-28
4
Medium Priority
?
233 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 2000 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

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

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 …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

770 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