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

Error Invoking CFC... but it's there! I see it!

New Here ,
Oct 26, 2010 Oct 26, 2010

Copy link to clipboard

Copied

Greetings all -

I'm hoping someone can help explain why this following attempt at binding a CFC is not working:

1. I set up a CF Server Mapping to my cfc folder:

Logical path = /testcfc

Physical path = E:\ColdFusion8\Components\testcfc

2. I set up a virtual directory to my cfc folder:

Virtual path: /testcfc
Physical path: E:\ColdFusion8\Components\testcfc

3. If I use CFINVOKE to call the CFC, it works as expected.

<cfinvoke component="testcfc.testRequests" method="get_Clients" returnvariable="var">
<cfinvokeargument name="fiscal_year" value="#year(now())#">
</cfinvoke>
<cfdump var="#var#">

4. If I attempt to bind the CFC, I get the error "Error Invoke CFC /testResults.cfc: Not Found"

<cfselect name="tstClientID" id="tstClientID" bind="cfc:testcfc.tstRequests.get_Clients('#year(now())#')" bindonload="true" value="client_id" display="client_name" />

Debugging the error, I see that CF is attempting to find the CFC in the root directory of the app... it is disregarding the directory path ("testcfc") specified entirely. Why??

The bizarre thing is, I've set up the same structure on my PC/dev environment, and it works fine.

How can I further debug this issue? It's got to be a mapping problem, but can;t see what I've done wrong. Any help truly appreciated!

Doug

TOPICS
Advanced techniques

Views

2.2K

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 ,
Oct 26, 2010 Oct 26, 2010

Copy link to clipboard

Copied

Typo above... the bind is actually: cfc:testcfc.testRequests.get_Clients... so that's not the 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 ,
Oct 26, 2010 Oct 26, 2010

Copy link to clipboard

Copied

I recently stumbled upon this post:

http://www.codersrevolution.com/index.cfm/2008/9/10/ColdFusion-CFC-Binding-Ajax-Proxy-and-Updater-1#...

Sure enough, my prod environment is running 8.0.0. I'm going to apply to apply the patch to 8.0.1 and see if that corrects the issue. I hope.

Doug

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 ,
May 16, 2017 May 16, 2017

Copy link to clipboard

Copied

LATEST

This can happen when you are passing too many parameters to the function.

My case I am passing arrays to the function and noticed the same error. I Used setHTTPMethod("POST") before my ajax call. It worked for me.

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