Coldfusion 2021 CFC corrupted after any modification
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.
