1 Reply Latest reply on Jun 15, 2017 2:56 PM by Homestar9

    Error Instantiating a CFC depending on cffunction name

    Curtis Baker_811



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


      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?