Copy link to clipboard
Copied
We noticed an issue yesterday when with a cached CFC seemingly corrupted. We ran a number of tests and are able to recreate the issue:
Here's a test:
- Run any web pages that use the cfc to make sure they're working
- Add a space inside one of the comments in the CFC file
- Try to run the web page again. It'll error out.
- In CF Admin, clear the cache
- Test the web page again, it'll work
Also, in cfclasses, related class files are updated the moment we change the CFC and run the web page, and they won't change after clear cache, indicating the problem doesn't initiate in class files.
More details:
- The CFC errors out with any change, even if with an additional space inside a comment.
- Once we clear the cache in CF Admin, the problem goes away. This never happened with older version of CF all the way to the begining of CFCs. We used to have the problem of CFC not getting updated until we cleared the cache, but with CF2021, it actually errors out.
- This is the error generated when any cfc method is called, regardless of where the change was made. I replaced the method name with **Method/Function Name** below:
"The {**Method/Function Name**} method was not found. Either there are no methods with the specified method name and argument types or the {**Method/Function Name**} method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity."
- No syntax error is introduced in the CFC. The moment we clear the cache, the error dissapears.
Copy link to clipboard
Copied
FWIW, I've not heard of this being a general problem. Indeed, I've not heard of it at all. Still, let me ask some questions to help us help you.
Copy link to clipboard
Copied
The behaviour you describe and the error message suggest one thing: when the CFC is invoked, ColdFusion encounters a duplicate CFC name or class name somewhere. To start, give the CFC a unique name, and see what happens.
On the other hand, this might be a bug in ColdFusion 2021. That is, the error might be occurring through no fault of your own. That is unlikely though. If it was a bug, many developers would have reported it. In any case, my advice here is that you apply the latest ColdFusion 2021 update.