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

CFAJAXPROXY: "The specified CFC proxy could not be found."

Engaged ,
Aug 21, 2009 Aug 21, 2009

Copy link to clipboard

Copied

{ColdFusion 8, latest, Windows.}

The following statement occurs (in an included CFM file):

<cfajaxproxy cfc="crv2_js" jsclassname="ServerProxy">

The "crv2_js.cfc" file is indeed located in the same directory.  (If you request it at the same URL, and enter the administrator password, a nice formatted description of the library and its methods dutifully appears, so it is there...)

But the error is:

The specified CFC proxy could not be found.

The path to the CFC must be specified as a full path, or as a relative path from  the current template, without the use of mappings.

Looking also on the Administrator screen, I confirm that the directory is not mapped.

Other, <cfinvoke> calls have been used to a sister CFC-library in the same directory without incident.  So I am confident that the message that I am seeing is somehow bogus ... but I do not yet know what sort of "bogosity" it must be.

TOPICS
Advanced techniques

Views

9.3K

Translate

Translate

Report

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
Engaged ,
Aug 24, 2009 Aug 24, 2009

Copy link to clipboard

Copied

Bump ...

Votes

Translate

Translate

Report

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
Engaged ,
Aug 24, 2009 Aug 24, 2009

Copy link to clipboard

Copied

Now here is something I didn't expect to see.  When I turned on "extended error information" (or whatchamacallit...) I got this additional information in the displayed log:

The specified  CFC proxy could not be found.

The path to the CFC must be  specified as a full path, or as a relative path from the current template,  without the use of mappings.
The  error occurred in C:\Inetpub\wwwroot\NCPT\CRV2\cr_PrototypeManager.cfm: line  235
                                    <cfgridcolumn
                                     name="DefinitionIsLocked"
233 :                                     header="Is In Use"
234 :                                     type="boolean"
235 :                                     select="no">
236 :                                                                 
237 :                                    </cfgrid>

(Ooh... formatted!  Now ain't that slick!)

I took the liberty of pasting-in lines 231-232, which the debugging-output did not include.  In fact, here is the entire block of code:

<cfgrid name="datagrid" pagesize="5" format="html" width="100%" height="200"
"cfc:proxy.GridSource_ReviewPrototypes({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},getPageSize())">
                               
<cfgridcolumn
   name="ID"               
    header="ID"                
   display="false"    >
<cfgridcolumn
   name="TemplateName"       
    header="Template Name" >
<cfgridcolumn
   name="PrototypeClassName"   
   header="Prototype Class" >
<cfgridcolumn
   name="Description"
   header="Description">
<cfgridcolumn
   name="Enabled"
   header="Enabled"
   type="boolean">
<cfgridcolumn
   name="DefinitionIsLocked"
   header="Is In Use"
   type="boolean"
   select="no">
</cfgrid>


So...  why on earth would an error like that be showing up at a place like this?  (Removing the "select='no'," on the wild-guess theory that it might be "the odd man out," as-expected had no useful effect.)

My hypothesis here is that the "failure location" actually has nothing to do with anything:  this is simply the last clause in the CFGrid construct, and the computer is now trying to place a call to this function:

<cffunction name="GridSource_ReviewPrototypes" access="remote" returntype="any">
  <cfargument name="page"                 required="yes">
  <cfargument name="pageSize"             required="yes">
  <cfargument name="gridsortcolumn"       required="yes">
  <cfargument name="gridsortdirection"    required="yes"> 

    <cfargument name="customPageSize"       required="no"     default="0">
        ...

Uh huh... straight out of a demo.

I thought I had just-now discovered the problem, as I was writing this, because the "bind" expression had two additional parameters which are not listed in <cfargument> tags.  But, much to my surprise, it didn't fix it.

To be absolutely complete in my description:

  1. In an included header-file, we have:  <cfajaxproxy cfc="crv2_js" jsclassname="ServerProxy">
  2. On this (Windows) host, the file-name of the CFC file is "crcv2_js.cfc" and it is located in the same directory as both the cfm and the included cfm.
  3. In the <head> portion of the main page, we have (in an in-line <script> tag):    
  4. var proxy = new ServerProxy();
        proxy.setErrorHandler(showError);
        proxy.setCallbackHandler(handleResult);

I'm starin' at this thing and starin' at this thing and everything I see is screamin' at me, "bogus!"    'Cept I know it can't be.

The generated page-source code includes the following, including a bit which I have highlighted in bold face.  I don't know where that bit came from.

<script type="text/javascript">
ColdFusion.Ajax.importTag('CFAJAXPROXY');
</script>
<script type="text/javascript">
var _cf_crv2_js=ColdFusion.AjaxProxy.init(
  '/CRV2/crv2_js.cfc','ServerProxy');

but it does seem plausible since the URL to the site-page (on case-insensitive Windows) is, indeed: 
   http://tlcapps/crv2/cr_PrototypeManager.cfm

and, again, if I type in  "http://tlcapps/CRV2/crv2_js.cfc" and prove that I do know the proper ColdFusion admin-password, I get a nice pretty-printed description of this library and its methods... including the one I am trying to call.  It does exist.

Votes

Translate

Translate

Report

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
Community Beginner ,
Mar 25, 2010 Mar 25, 2010

Copy link to clipboard

Copied

Any answer to this one as I am experiencing the same problem.

Votes

Translate

Translate

Report

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 ,
Apr 28, 2010 Apr 28, 2010

Copy link to clipboard

Copied

just curious, if you create a folder within your site with the same name as your root folder and drop your component inside, does it work?

Votes

Translate

Translate

Report

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
Guest
Apr 28, 2010 Apr 28, 2010

Copy link to clipboard

Copied

Shouldn't matter as long as Coldfusion knows where to find the cfcs or custom tags etc.

Votes

Translate

Translate

Report

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

I have the same problem. I created my website on my portable computer (coldfusion standalone). The cfc is working perfectly. I copy the website on the production server as is. Everything work except the CFC that gives this error. So it is a matter of environment. My two Coldfusion are setup differently on both computers so I need to find what cause this.

I downloaded a simple sample that use a CFC from adobe documentation. The program work on my portable computer but not on the server which gives me same error for the CFC.

Votes

Translate

Translate

Report

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
Valorous Hero ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Is the CFIDE/SCRIPTS direcotory web accessable on the production system?  This is where ColdFusion keeps all it's JavaScript and other web client files.  If it is not web accessable, functionality the relies on it will fail.

A simple test.

www.yourDomain.com/CFIDE/Scripts/wddx.js

If that return a javascript file, this is not your problem.  If it does not, then this may be an issue.

Votes

Translate

Translate

Report

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Yes cfide is availlable. When it is not there my textarea with richtext option don't work.

In fact my production server is at problem. It has been migrated from mx7 to mx9. Mx9 has been uninstall then reinstall. Normally it should not be a problem but I think I probably copy some of my xml configuration files from my previoux mx7 to my mx9 to make my install faster.

Anyway I know I have a directory problem somewhere else in Coldfusion so probably this is why the CFC can not find its path.

The other directory problem: I did a c:\coldfusion mx9\bin\connectors\Remove all connectors.bat then I launch the creation of the connectors and I had an error saying the that some path taken from the registry were not good. Actually the path coldfusion was showing me were old path from a previous mx7 install. I manage to make the thing work but I now know my installation is at problem.

I decided to put it here so that people having the same problem get a hint of what to look for.

Carl

Votes

Translate

Translate

Report

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
Explorer ,
Sep 07, 2010 Sep 07, 2010

Copy link to clipboard

Copied

I've just come across what might be the same issue, and found a slightly surprising workaround.

I'm following the examples in Chapter 30 of CFWACK Vol 2 (Advanced ColdFusion-Powered Ajax) on pages 271-272 (code in foot).

Creating proxytest.cfc and ajaxproxy1.cfm in the same folder, calling ajaxproxy1.cfm displays the error:

The specified CFC proxytest could not be found.

Calling the method via another page:

<cfinvoke component="proxytest" method="sayHello" name="Bill" returnvariable="response">

<cfoutput>#response#</cfoutput>


displays the results Hello, Bill, confirming that calling sayHello() via cfinvoke (with no path information in the component attribute) works fine.

The files I'm working on are in the folder C:\Web Sites\Development\ColdFusion\CFWACK\30.

I just happened to add a ColdFusion mapping on the server of /development pointing to C:\Web Sites\Development, and suddenly found that ajaxproxy1.cfm worked fine, without changing the cfc attribute at all (i.e. to "/development/ColdFusion/CFWACK/30/proxytest").

Hope this helps.

ajaxproxy1.cfm

<cfajaxproxy cfc="proxytest" jsclassname="proxytest">

<script>
var myProxy = new proxytest();

function runProxy() {
var name = document.getElementById("name").value;
var result = myProxy.sayHello(name);
alert(result);
}
</script>

<form>
<input type="text" id="name" />
<input type="button" onclick="runProxy()" value="Run Proxy">
</form>

proxytest.cfc

<cfcomponent>

<cffunction name="sayHello" access="remote" returntype="string" output="false">

<cfargument name="name" type="string" required="true">

<cfreturn "Hello, #arguments.name#">

</cffunction>

</cfcomponent>

Votes

Translate

Translate

Report

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 ,
Jan 15, 2016 Jan 15, 2016

Copy link to clipboard

Copied

LATEST

So, I also got this error in Coldfusion 10 and thought I would update this thread in case some other poor person gets the error.

From the category of "bogosity", I am definitely calling it Bogus under the category of unhelpful error messages which seem to have absolutely no relation to the actual error.

Like TLC-IT, I attempted to run the cfc by itself.  Amazingly, I got a different error - on the cfc itself (obviously the file was, in fact, there).  I fixed that error and... what do you know... now the calling program can find it.

Hope this helps someone!

Jim

Votes

Translate

Translate

Report

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
Documentation