Example stack ...

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.(ZoneInfoFile.java:XXX)
....

Jump to section: (Cause) (Confirm - Method #1) (Confirm - Method #2) (Action) (Resolution)
The instructions in this document make references to generic terms in Italics that will need to be replaced with information specific to the support call and the environment. It is very important that consistent and accurate values be used in place of the Italicized generic terms when collecting the data to ensure the prompt and correct delivery of the data when uploaded.
Generic Term
Replace with
PATH
DATE
FS
MOUNTPT
A path where diagnostic files will be created
The date at the time of the data collection
The filesystem in question
The mount point in question
Overview
Step-by-Step Instructions

Cause:


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.

Confirm
Method #1
Non - System Impacting Problem Verification


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.


Compiling the dirinfo.c file:

Make sure you have a compiler installed.
For this example:
# lslpp -l | grep -i xlc
xlC.adt.include 13.1.2.0 COMMITTED C Set ++ Application
xlC.aix61.rte 13.1.2.0 COMMITTED IBM XL C++ Runtime for AIX 6.1
xlC.msg.en_US.rte 13.1.2.0 COMMITTED IBM XL C++ Runtime
xlC.rte 13.1.2.0 COMMITTED IBM XL C++ Runtime for AIX
xlccmp.13.1.2 13.1.2.0 COMMITTED XL C compiler
xlccmp.13.1.2.bundle 13.1.2.0 COMMITTED XL C media defined bundles
xlccmp.13.1.2.lib 13.1.2.0 COMMITTED XL C libraries for AIX 6.1 and
xlccmp.13.1.2.license 13.1.2.0 COMMITTED XL C license files
xlccmp.13.1.2.ndi 13.1.2.0 COMMITTED XL C non-default installation


Place the 'dirinfo.c' you have downloaded from our FTP site in a directory by itself
# mkdir PATH/dirinfo_files

Place the files in the PATH/dirinfo_files

# cd PATH/dirinfo_files
# xlc -o dirinfo dirinfo.c
# ls
dirinfo dirinfo.c
# file *
dirinfo: executable (RISC System/6000) or object module not stripped
dirinfo.c: c program text


Example output after compiling the C program 'dirinfo.c' (found on the testcase server), and executing the 'dirinfo' command against the filesystem in question:

When the filesystem is mounted:

# ./dirinfo /example_fs
/ - mode 755 uid 0 gid 0, mounted-over mode 755 uid 0 gid 0
/example_fs - mode 777 uid 314 gid 0, mounted-over mode 700 uid 0 gid 0


When the filesystem is not mounted:

# ./dirinfo /example_fs
/ - mode 755 uid 0 gid 0, mounted-over mode 755 uid 0 gid 0
/example_fs - mode 700 uid 0 gid 0


Confirm
Method #2
System Impacting Problem Verification


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}

More details ...


[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

Action


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}


More details ...

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

Resolution


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}


More details ...


# 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.

Step 6:

ACTION

See hints and examples ...

Text goes here

Step 7:

ACTION

See hints and examples ...

Text goes here

Step 8:

ACTION

See hints and examples ...

Text goes here

Step 9:

ACTION

See hints and examples ...

Text goes here

Step 10:

ACTION

See hints and examples ...

Text goes here

Step 11:

ACTION

See hints and examples ...

Text goes here

Step 12:

ACTION

See hints and examples ...

Text goes here

Step 13:

ACTION

See hints and examples ...

Text goes here

Step 14:

ACTION

See hints and examples ...

Text goes here

Step 15:

ACTION

See hints and examples ...

Text goes here

Step 16:

ACTION

See hints and examples ...

Text goes here

Step 17:

ACTION

See hints and examples ...

Text goes here

Step 18:

ACTION

See hints and examples ...

Text goes here

Step 19:

ACTION

See hints and examples ...

Text goes here

Step 20:

ACTION

See hints and examples ...

Text goes here

Step 21:

ACTION

See hints and examples ...

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