Sqoop job failed with ClassNotFoundException

In the last few weeks, I was dealing with an issue that when importing data from DB2 into HDFS, it kept failing with NoClassDefFoundError. Below was the command details: sqoop import –connect jdbc:db2://<db2-host-url>:3700/db1 –username user1 –password changeme –table ZZZ001$.part_table –target-dir /path/in/hdfs –fields-terminated-by \001 -m 1 –validate And the error message …