Troubleshooting

You can take some basic diagnostic steps to try to find the cause of a problem.

Class path problems

  • Run the batch launcher after you specify a log level of I (LOGLVL='+I') to display the CLASSPATH and other environment variables before you start the Java™ VM.
  • Try running your job with verbose: class added to your OPENJ9_JAVA_OPTIONS environment variable. This option causes the VM to write system class loader messages to the //SYSOUT data set, which can be useful in determining which class is missing.

Batch launcher problems

  • Run the batch launcher after you specify a log level of T: LOGLVL='+T'. This parameter causes the batch launcher to output trace information to the //SYSOUT data set.
  • Check that the batch job's userid value is properly configured to use UNIX System Services. Test the userid value by using it to login into the UNIX shell. For more information, see the z/OS® UNIX System Services Planning guide.
  • Verify that the version of the IBM SDK that you are trying to use is properly installed and configured. Check that the latest maintenance update is installed. Login to a UNIX shell with the user ID that you are trying to use and issue the following commands (substituting your installation's Java home directory):
    
    export JAVA_HOME=/usr/lpp/java/J17.0_64
    
    $JAVA_HOME/bin/java -version
    $JAVA_HOME/bin/java -cp $JAVA_HOME HelloWorld
  • Verify that the user home directory that is specified in your RACF® OMVS profile is the full path to a directory that exists in a file system that is mounted, and that you have read, write, and execute permissions for the directory (execute permission is needed for a user to change to a Unix directory). If your STDENV script changes to a directory or sets the PWD environment variable, verify that the directory exists and that your user has access. Otherwise, you might see the following message when you run an application using the JZOS Batch Launcher:
    JVMJZBL2999W Could not set current directory to: <dir>
    If you enable the JZOS launcher trace with parameter T: LOGLVL='+T', you might also see the following messages:
    JVMJZBL1006I PWD = <dir>
    JVMJZBL2999T Setting current working dir to: "<dir>"
    JVMJZBL2999W Could not set current directory to: <dir>
    The JZOS Batch Launcher runs the Unix script that you supply in the STDENV DD section of the JCL that starts the job. This script sets up the Unix environment variables for the Java program to start. After the Unix script completes, the JZOS Batch Launcher attempts to set the current working directory to the directory name that is indicated by the PWD environment variable. If the directory change is not possible, the JZOS launcher prints the warning. The default PWD value is the Unix home directory for the user ID that starts the job. The directory name in the warning message might be blank if the home directory is not set, or if the home directory does not exist.
    You can view the RACF OMVS profile for a z/OS user by using the following TSO command: LISTUSER <userid> OMVS. The OMVS INFORMATION section at the end of the output shows the home directory. For example:
    OMVS INFORMATION
    ----------------
    UID= 0000001234
    HOME= /u/userid
    PROGRAM= /bin/sh

Environment variable and STDENV shell script problems

  • Add a line, set -x, to the beginning of your shell script to trace the shell script run to the //STDOUT data set. You must set the LOGLVL parameter to +D or +T for this output to be displayed. For example: LOGLVL='+T'
  • If you set the log level to +T then find that the configuration child process is hanging or failing, check that you are properly setting required system environment variables. For more information, see Configuring environment variables for JZOS.