IBM Support

executeMapping.sh gets java exception NoClassDefFoundError

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.

[{"Product":{"code":"SSKTXT","label":"Tivoli Change and Configuration Management Database"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"7.2.2;7.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
27 February 2019

UID

swg21457260