Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need HELP

New Here ,
Feb 02, 2009 Feb 02, 2009
I am working on the gettingStarted section of Coldfusion & have setup coldfusion 8.0.1 server & dreamweaver CS4 on windows Vista.

I have successfully run the art gallery application (so my local & test env are setup along with the dsn "gettingstarted") but I am having issues in running the "Community application" which is detailed at the following link.

http://www.adobe.com/examples/cfgettingstarted/experience/index_content.cfm

I have verified that the Sponsor component exists in a components folder under another folder extensions, which is directly under the site root. I have also verified that I am able to connect to the DSN and get the data from the Sponsor table.

sponsor.cfc contains the following function/ query
----------------------------------------------------------------------------------
<cffunction name="getRandomAd" access="remote" output="false" returntype="string" hint="Returns a random swf or ad image.">
<cfargument name="fileType" required="true" type="string" hint=".swf, .jpg or .gif" />
<cfargument name="dsn" required="true" type="string" />
<cfset var ad="">
<cfset var getAd="">
<cfset var num=0>

<CFQUERY NAME="getAd" DATASOURCE="#arguments.dsn#">
SELECT SPONSORAD
FROM #TABLES.SPONSORS#
WHERE SPONSORAD LIKE '%#arguments.fileType#'
</CFQUERY>
-------------------------------------------------------------------------------------------------------------
application.cfc is directly under the site root and error is referred to line #59

============================================================
Error Occurred While Processing Request
Could not find the ColdFusion Component or Interface Sponsor.
Ensure that the name is correct and that the component or interface exists.

The error occurred in C:\ColdFusion8\wwwroot\cf8gettingstarted\community\Application.cfc: line 59

57 : <cfinvoke component="#request.cfcPathSponsor#" method="getRandomAd" returnvariable="application.banner">
58 : <cfinvokeargument name="dsn" value="#request.dsn#">
59 : <cfinvokeargument name="fileType" value=".swf">
60 : </cfinvoke>
61 : </cfif>
===========================================================================

I am a newbie and would appreciate if somebody can help me.
Thank You/
TOPICS
Getting started
490
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2009 Feb 02, 2009
Fenneups wrote:
> I have verified that the Sponsor component exists in a components folder under
> another folder extensions, which is directly under the site root. I have also
> verified that I am able to connect to the DSN and get the data from the Sponsor
> table.
>

ColdFusion will not automatically look that deep for a component. It
will look in the same folder as the calling file. It will look in the
server defined 'custom tag' folder(s) and it will try to match the
beginning of the component path to a server defined mapping. If it can
not find the named component any one of those locations then it throws
this error.

You either need to adjust the #request.cfcPathSponsor# so that
ColdFusion can find the desired component relative to one of those
beginnings or move the component to one of those locations.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2009 Feb 03, 2009
LATEST
Thank you Ian. it did solve my problem. Appreciate your quick response.

Cheers!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources