Author: Steven Neiland
Published:

Yesterday I ran into a strange bug with a legacy cf9 orm application where it could not find a particular bean despite it existing. What was even more peculiar was that the same code was running perfectly on two other servers.

After a couple of hours hacking at the server, restarting it and googling I finally stumbled on the answer. It appears that ColdFusion was hanging onto a bad version of the code class file in its cache and I needed to manually clear its cache.

How to Clear ColdFusion's Class File Cache

When ColdFusion read cfml and cfc files it compiles them into to Java Class files. On some rare occasions you may find you need to clear these cached class files. To do so follow these steps:

  1. Stop the ColdFusion Service
  2. Locate your cfclasses directory at {coldfusion install dir}/wwwroot/WEB-INF/cfclasses
  3. Delete all .class files in this directory
  4. Start the ColdFusion Service

When you start the Service back up you can expect it to take some time to recompile all the files if you have a large codebase so dont be surprised if it takes a while for everything to get back to normal.

What Do You Think?

Reader Comments

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.

*
*



Archives Blog Listing

Tag Listing

Learn CF In A Week

Treehouse

 
Fork me on GitHub