IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Shared classes diagnostic data > Debugging problems with shared classes



Why classes in the cache might not be found or stored

This quick guide helps you to diagnose why classes might not be being found or stored in the cache as expected.


Why classes might not be found

The class is stale

As explained in Understanding dynamic updates, if a class has been marked as "stale", it is not returned by the cache.

A JVMTI agent is being used without a modification context

If a JVMTI agent is being used without a modification context, classes cannot be found in the cache. The effect is to give the JVMTI agent an opportunity to modify the bytecode when the classes are loaded from disk. For more information, see Dealing with runtime bytecode modification.

The Classpath entry being used is not yet confirmed by the SharedClassURLClasspathHelper

Class path entries in the SharedClassURLClasspathHelper must be "confirmed" before classes can be found for these entries. A class path entry is confirmed by having a class stored for that entry. For more information about confirmed entries, see the SharedClassHelper Javadoc information.


Why classes might not be stored

The cache is full

The cache is a finite size, determined when it is created. When it is full, it cannot be expanded. When the verbose suboption is enabled a message is printed when the cache reaches full capacity, to warn the user. The printStats utility also displays the occupancy level of the cache, and can be used to query the status of the cache.

The cache is opened read-only

When the readonly suboption is specified, no data is added to the cache.

The class does not exist on the file system

The class might be sourced from a URL location that is not a file.

The class has been retransformed by JVMTI and cacheRetransformed has not been specified

As described in Dealing with runtime bytecode modification, the option cacheRetransformed must be selected for retransformed classes to be cached.

The class was generated by reflection or Hot Code Replace

These types of classes are never stored in the cache.


Why classes might not be found or stored

The cache is corrupted

In the unlikely event that the cache is corrupted, no classes can be found or stored.

A SecurityManager is being used and the permissions have not been granted to the class loader

SharedClassPermissions must be granted to application class loaders so that they can share classes when a SecurityManager is used. For more information, see Using SharedClassPermission.


Parent: Debugging problems with shared classes








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.