Determining which class files are loaded by ColdFusion MX
Issue
The JVM arguments specified within the ColdFusion MX Administrator can be modified to include a parameter to write out a listing of all class files that are loaded in the JVM's memory space. This can be useful for debugging class loading conflicts and for analyzing application object usage.
By adding the -verbose:class argument to the JVM Arguments field on the Java and JVM settings page in the ColdFusion MX Administrator, the JVM will write out to a file a listing of all class files currently loaded into its memory space.
Solution
- In the ColdFusion MX Administrator, navigate to the Java and JVM page.
- In the JVM Arguments field, add the following entry:
-verbose:class
- Click Submit Changes to save the change.
- Restart the ColdFusion Application Server service for the change to take effect.
Once this argument has been added, the JVM will write out a listing of all loaded class files tocf_root\runtime\logs\default-out.log. The entries in the log will appear similar to the following:
[Opened C:\CFusionMX\runtime\jre\lib\rt.jar] [Opened C:\CFusionMX\runtime\jre\lib\sunrsasign.jar] [Opened C:\CFusionMX\runtime\jre\lib\jsse.jar] [Opened C:\CFusionMX\runtime\jre\lib\jce.jar] [Opened C:\CFusionMX\runtime\jre\lib\charsets.jar] [Loaded java.lang.Object from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.io.Serializable from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.Comparable from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.CharSequence from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.String from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.Class from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.Cloneable from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.ClassLoader from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.System from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.Throwable from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.Error from C:\CFusionMX\runtime\jre\lib\rt.jar] [Loaded java.lang.ThreadDeath from C:\CFusionMX\runtime\jre\lib\rt.jar]
Note: When verbose class logging is enabled, the default-out.log file will increase in size rapidly and performance will be affected, so we do not recommend leaving this enabled for extended periods of time.
Additional Information
- Invalid minimum JVM heap size will prevent ColdFusion MX from starting (18846)
- ColdFusion MX: Tips for performance and scalability (18540)
- JRun 4.0: Configuring the Error and Out log files (18243)
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
