ColdFusion Class Checker

What’s new in 8.2
Microservice support in FusionReactor 8.2.0

FusionReactor is used to monitor many ColdFusion servers but our support team keeps seeing an issue that FusionReactor cannot solve.

This issue is that some of the ColdFusion classes, for the template cache, become corrupt.  This corruption isn’t caused by ColdFusion itself but when users or Windows Updates shut down the running instance.  If ColdFusion is in the middle of a class compilation operation when the shutdown occurs then ColdFusion leaves the half written file on disk.

These corrupt files can also occur due to file system issues, especially if the ColdFusion directory is stored on a network share.

When our support team is working with customers with 15,000+ ColdFusion classes in their template cache directory ( e.g /opt/coldfusion9/wwwroot/WEB-INF/cfclasses/ ) and attempting to track down a specific issue in the template cache, there is no simple solution to find the offending file.

We decided to write a tool to track down where these issues were so that we didn’t have to wipe out the complete template cache.

The ColdFusion Class Checker will scan the directory and ensure that all the class files can be successfully parsed.

 

Usage

 

usage: java -jar cfclasschecker.jar

ColdFusion Class Checker.
This tool is designed to find issues with template cache directory.
 -d,--directory <arg>   the directory to scan.
 -h,--help              help
 -v,--verbose           verbose

Copyright © 2016-2019 Intergral GmbH. All rights reserved.

 

 

Example

Here is a quick example of how to run the tool and how errors are shown.

$ java -jar cfclasschecker.jar -d /opt/coldfusion9/wwwroot/WEB-INF/cfclasses/<br>ERROR : /opt/coldfusion9/wwwroot/WEB-INF/cfclasses/cfpostNumericMetricFloat2ecfm551476648.class is INVALID
$

This shows 1 invalid class file in the coldfusion9 cfclasses directory that.   You can simply delete this file and ColdFusion will generate the class again next time it needs too.