Troubleshooting
Problem
When running the command "java db2evmonfmt" you may see the following Java exception:
com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.63.75] Failure
in loading native library db2jcct2, java.lang.UnsatisfiedLinkError:
db2jcct2 (A file or directory in the path name does not exist.):
ERRORCODE=-4472, SQLSTATE=null
at com.ibm.db2.jcc.am.fd.a(fd.java:663)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:94)
at com.ibm.db2.jcc.t2.a.a(a.java:37)
at com.ibm.db2.jcc.t2.T2Configuration.
Cause
You may be using the wrong version of Java Virtual Machine (JVM).
Resolving The Problem
1. The comments at the beginning of the db2evmonfmt.java source file contain instructions on setting up and using db2evmonfmt. Ensure that the environment variables like PATH, CLASSPATH and LD_LIBRARY_PATH are correctly set up.
// SOURCE FILE NAME: db2evmonfmt.java
//
// SAMPLE: Extract the XML report from the event monitor
//
// Steps to run the sample with command line window:
//
// 1) Copy the following file to your working directory and ensure that
// directory has write permission:
//
// <install_path>/samples/java/jdbc/db2evmonfmt.java
// <install_path>/samples/java/jdbc/*.xsl
//
// 2) Modify the CLASSPATH to include:
//
// <install_path>/sqllib/java/db2java.zip
// <install_path>/sqllib/java/db2jcc.jar
// <install_path>/sqllib/java/db2jcc_license_cu.jar
// <install_path>/sqllib/java/<jdkDirName>/lib
// <install_path>/sqllib/lib
// <install_path>/sqllib/function
// <install_path>/sqllib/java/sqlj.zip
// where <jdkDirName> is the name of the
// jdk directory under <install_path>/sqllib/java.
//
// 3) Modify the PATH to include <install_path>/sqllib/java/<jdkDirName>/bin,
// <install_path>/sqllib/lib.
//
// 4) Modify the LD_LIBRARY_PATH to include <install_path>/sqllib/lib
//
// 5) Compile the source file with: javac db2evmonfmt.java
//
// 6) Run the program: java db2evmonfmt -h
// for command line options.
2. Check that you are using the Java Virtual Machine (JVM) that is bundled with DB2:
which java
Ensure that the path to the java executable is:
<instance-home>/sqllib/java/<jdk-dir>/bin/java
For example,
/home/db2inst1/sqllib/java/jdk64/bin/java
It may be a good idea to add <instance-home>/sqllib/java/<jdk-dir>/bin to the beginning of the PATH environment variable to ensure that it precedes other JVM you may have on your system.
Was this topic helpful?
Document Information
More support for:
IBM Smart Analytics System
Software version:
9.7
Operating system(s):
Linux, AIX
Document number:
479857
Modified date:
16 June 2018
UID
swg21613107