java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:XXX)
at java.nio.file.FileSystems.getDefault(FileSystems.java:XXX)
at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:XXX)
at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:XXX)
at java.security.AccessController.doPrivileged(AccessController. java:XXX)
at sun.util.calendar.ZoneInfoFile.
....
When running a Java process, you may encounter a "java.lang.ExceptionInInitializerError"
{Example stack is at the top of this document}
The java.nio.file.FileSystems.getDefault() class defines the getDefault method to get the default file system and factory methods to construct other types of file systems.
The first invocation of any of the methods defined by this class causes the default provider to be loaded. The default provider, identified by the URI scheme "file", creates the FileSystem that provides access to the file systems accessible to the Java virtual machine. If the process of loading or initializing the default provider fails then an error is thrown.
This points to the permissions of the filesystem and/or the permissions of the mount point for that filesystem not being set to allow the user who started the Java process to access or modify the filesystem (or directories in the filesystem for that matter), as being the root cause of this error.
Check the permissions of not only the filesystem, but the filesystem's mount point as well.
***This method does not require the file system to be unmounted to confirm the issue.***
If there is a question of the permissions a filesystem or its mount point, there is a C script that can be compiled and run to give you details about the filesystem and its mount point.
To obtain the C program (named 'dirinfo.c'), please use the following link:
ftp://ftp.software.ibm.com/aix/tools/java/tools/dirinfo.c
This option requires the compilation of a simple C program.
Either the system having the problem has to have the C compiler installed, or you must compile the sample program on a system that does have a C compiler installed, and then copy the program over to the system with the problem.
Check the permissions of not only the filesystem, but the filesystem's mount point as well.
Once unmounted, you may find that the filesystem's mount point has different permissions than the filesystem itself.
***Checking and/or changing the permissions of the mount point using this method, will require you to unmount the filesystem
Make sure to complete the steps to change the permissions of the mount point before remounting the filesystem***
{See the "More details" section for an example of how to properly check the permissions of the filesystem and it's mount point}
If the permissions of the mount point do not match the permissions of the over mounted filesystem, and the permissions of the over mounted filesystem are the permissions desired, then you must unmount the over mounted filesystem.
*** Required: To resolve this issue, the applications using the file system must be stopped and the filesystem must be unmounted . There is no option available for resolving this without unmounting the file system. ***
{See the "More details" section of this document for steps to get permissions on mount point and filesystem to match}
Here is an example of how to properly check the permissions of the filesystem and it's underlying mount point:
[root] /
# ls -ld /example_fs
drwxrwxrwx 4 root system 256 Sep 22 14:46 /example_fs
[root] /
# umount /example_fs
[root] /
# ls -ld /example_fs
drwxr--r-- 2 root system 256 Sep 22 14:43 /example_fs
[root] /
# chmod R 777 /example_fs
[root] /
# ls -ld /example_fs
drwxr--r-- 2 root system 256 Sep 22 14:43 /example_fs
[root] /
# mount /example_fs
If unmounting the filesystem and changing the permissions of the mount point to match those of the permissions on the filesystem does not fix the issue, please open a PMR with IBM Java support.
Please be ready to provide any / all logs pertaining to the issue with the full stack from the Java exception, as well as output showing the permissions of not only the filesystem, but the mount point as well.
{See the "More details" section of this document for steps to get permissions on mount point and filesystem to match}
# mkdir -p PATH/DATE/data
> Copy any and all loggs pertaining to the issue with the full stack from the Java exception to this directory
# cd PATH/DATE/data
# script PATH/DATE/data/script.out
# mount
# ls -ld /FS
# umount /FS
# ls -ld /MOUNTPT
# mount /FS
# exit ----> this will stop the capturing of data the 'script' command is capturing
# cd PATH
# tar -cvf DATE.data.tar ./DATE
The DATE.data.tar file will be what needs to be uploaded to IBM Java support to document the environment.
*You can also use the dirinfo C program provided in Step 3 to show the permissions of the filesystem in question and it's mount point, just redirect the output to a file and place in the PATH/DATE/data directory to be uploaded with your logs.
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Text goes here
Document Type: | Instruction |
Content Type: | Troubleshooting |
Hardware: | all Power |
Operating System: | All AIX Versions |
IBM Java: | All Java Versions |
Author(s): | Christopher C Peters |
Reviewer(s): | Roger Leuckie |
[root] /
# ls -ld /example_fs
drwxrwxrwx 4 root system 256 Sep 22 14:46 /example_fs
[root] /
# umount /example_fs
[root] /
# ls -ld /example_fs
drwxr--r-- 2 root system 256 Sep 22 14:43 /example_fs
[root] /
# chmod -R 777 example_fs
drwxr--r-- 2 root system 256 Sep 22 14:43 /example_fs
[root] /
# ls -ld /example_fs
drwxrwxrwx 2 root system 256 Sep 22 14:43 /example_fs
[root] /
# mount /example_fs