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

Error Instantiating a CFC depending on cffunction name

Community Beginner ,
May 27, 2017 May 27, 2017

Copy link to clipboard

Copied

Hello,

I was trying to instantiate a CFC object but received an error:

struct
DetailEnsure that the name is correct and that the component or interface exists.
MessageCould not find the ColdFusion component or interface /Applications/ColdFusion2016/cfusion/wwwroot/labcliq/components/orders.cfc.

At first I tried all the obvious things, i.e. make sure the path is correct, that the cold fusion user has access to the file etc.

Literally wasted probably a week trying to get this to work only to find out it has nothing to do with not finding the component at all.  It appears that depending on the name of my embedded functions it will or will not instantiate.  I receive the preceding error when I have a function defined as such:

<cffunction name="getOrderOptions" access="public" output="true" returntype="void">

If I literally change the cffunction name value to:

<cffunction name="getOptions" access="public" output="true" returntype="void">

It loads fine.  This is occurring over multiple different functions names with no obvious consistency.  I have run into problems in the past with special 'reserved' words in cold fusion but some how I highly doubt that "getOrderOptions" would be reserved and "getOptions" not.

I also checked all other CFC's for duplicate function names (though that should not matter) and these are unique across the entire application.

Anyone have any ideas why this might occur?

Thanks,

-Curtis

TOPICS
Advanced techniques

Views

384

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
Contributor ,
Jun 15, 2017 Jun 15, 2017

Copy link to clipboard

Copied

LATEST

What does your instantiation code look like?

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