Troubleshooting
Problem
Running ITIC's executeMapping.sh gets a Java NoClassDefFoundError exception.
Symptom
The text output from the script ends with this exception:
...
finished file name 9
finished file name 10
done file names
Compiling 14 files 14
Exception in thread "main" java.lang.NoClassDefFoundError: sun.tools.javac.Main
at com.mro.fusion.compiler.FusionCompiler.compile(Unknown Source)
at com.mro.fusion.compiler.FusionCompiler.compile(Unknown Source)
at com.mro.fusion.compiler.FusionCompiler.compile(Unknown Source)
at com.mro.fusion.engine.EngineMain.go(Unknown Source)
at com.mro.fusion.engine.EngineMain.go(Unknown Source)
at com.mro.fusion.engine.EngineMain.initialize(Unknown Source)
at com.mro.fusion.engine.EngineMain.<init>(Unknown Source)
at com.mro.fusion.engine.EngineMain.doMain(Unknown Source)
at com.mro.fusion.engine.EngineMain.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: sun.tools.javac.Main
at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
at sun.misc.Launcher$AppClassLoader.loadClass(ClassLoader.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
... 9 more
Cause
Either the wrong Java home directory was given to the ITIC installer or the wrong version of Java is being used.
Resolving The Problem
1) The most common reason for this error is the <JAVAHOME>/bin directory was entered during the install when it requested the Java Home directory. Check to see what the <ITIC_DIR>/bin/init.sh file contains for the JAVA_HOME environment variable. This should not be pointing to the bin directory, but instead the Java's home directory.
For example:
The workaround for this problem was to change JAVA_HOME in the <ITIC_DIR>/bin/init.sh file to the following:
# ===============
# SPECIFY THE JDK
# ===============
#JAVA_HOME=/opt/ibm/java2-i386-50/bin <--- this is incorrect
JAVA_HOME=/opt/ibm/java2-i386-50/
2) If that is not the issue, then make sure the Java that is being used is IBM Java SDK 5.0. To determine this, enter the "java -version" command from the same directory you were running the executeMapping.sh script. It should return Java version. Use the "which java" and "echo $PATH" statements to help identify which Java is getting called.
Was this topic helpful?
Document Information
Modified date:
27 February 2019
UID
swg21457260