Blog

ColdFusion 2021: “Could not initialize class…” error after service restart

December 1, 2020

Another potential bug found within ColdFusion 2021 with this error:

Could not initialize class cfApplication2ecfmXXXXXXXXX

Interestingly the TYPE of error was: java.lang.NoClassDefFoundError

The class name cfApplication2ecfmXXXXXXXXX indicated to me that it was an issue with the saved class files in {CFRoot}\cfusion\wwwroot\WEB-INF\cfclasses

The file cfApplication2ecfmXXXXXXXXX.class did exist in the \cfclasses folder

The only working solution I’ve found so far is to disable the “Save class files” option using the ColdFusion administrator console (Server Settings > Cache > Uncheck Save class files)

There seems to be conflicting recommendations about this settings, however the ColdFusion administrator console states that the option should be enabled for production servers.

My own testing has revealed the primary drawback to be an initial hit on the server CPU after rebooting or resetting the ColdFusion service.

After the initial startup hit the server seems to function normally.

1 Comment

Drew
DrewMay 1, 2022 at 6:48:33 am

Thanks! It happened to me a few times too. Another solution is to somehow touch the file to force Coldfusion to refresh the cache. Eg,

1. Note cfApplication2ecfmXXXXXXXXX is for Application.cfm
(remove the "cf" prefix, and replace "2e" with ".")
2. In that file, for example Application.cfm, add a space character without breaking the code.
3. Save it.

If there are multiple files with the same name, try your luck by making the change one file at a time.

Leave Your Comment

Your email address will not be published. Required fields are marked *


about me

An information technology professional with twenty five years experience in systems administration, computer programming, requirements gathering, customer service, and technical support.