IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Shared classes diagnostic data > Debugging problems with shared classes
Dealing with initialization problems
Shared classes initialization requires a number of operations to succeed. A failure might have many potential causes, and it is difficult to provide detailed message information following an initialization failure. Some common reasons for failure are listed here.
If you cannot see why initialization has failed from the command-line output, look at level 1 trace for more information regarding the cause of the failure. Review Operating system limitations. A brief summary of potential reasons for failure is provided here.
Writing data into the javasharedresources directory
To initialize any cache, data must be written into a javasharedresources directory, which is created by the first JVM that needs it.
On Windows, this directory is C:\Documents and Settings\<username>\Local Settings\Application Data\javasharedresources. The memory-mapped file is written here..
Problems writing to this directory are the most likely cause of initialization failure. A default cache name is created that includes the username to prevent clashes if different users try to share the same default cache. All shared classes users must also have permissions to write to javasharedresources. The user running the first JVM to share classes on a system must have permission to create the javasharedresources directory.
Initializing a persistent cache
Persistent caches are the default.
The following operations must succeed to initialize a persistent cache:
- 1) Creating the cache file
- Persistent caches are a regular file created on disk. The main reasons for failing to create the file are insufficient disk space and incorrect file permissions.
- 2) Acquiring file locks
- Concurrent access to persistent caches is controlled using operating system file-locking. File locks cannot be obtained if you try to use a cache that is located on a remote networked file system. For example, an NFS or SMB mount. This option is not supported.
- 3) Memory-mapping the file
- The cache file is memory-mapped so that reading and writing to and from it is a fast operation. You cannot memory-map the cache file to a remote networked file system, such as an NFS or SMB mount. This option is not supported. Alternatively, memory-mapping might fail if there is insufficient system memory.
Initializing a non-persistent cache
The following operations must succeed to initialize a non-persistent cache:
- 1) Create a shared memory area
- A memory-mapped file is created on the file system and deleted when the operating system is restarted. The main reasons for failing to create a shared memory area are lack of available disk space and incorrect file write permissions.
- 2) Create a shared semaphore
- Shared semaphores are created in the javasharedresources directory. You must have write access to this directory.
- 3) Write metadata
- Metadata is written to the javasharedresources directory. You must have write access to this directory.
If you are experiencing considerable initialization problems, try a hard reset:
- Run
java -Xshareclasses:destroyAll to remove all known memory areas and semaphores.
- Delete the javasharedresources directory and all of its contents.
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.