Skip to main content
Participating Frequently
October 26, 2010
Question

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

  • October 26, 2010
  • 2 replies
  • 2401 views

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

This topic has been closed for replies.

2 replies

Participant
May 16, 2017

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.

dsmith3Author
Participating Frequently
October 26, 2010

Typo above... the bind is actually: cfc:testcfc.testRequests.get_Clients... so that's not the issue.

dsmith3Author
Participating Frequently
October 26, 2010

I recently stumbled upon this post:

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

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