Support Questions

Find answers, ask questions, and share your expertise

Sqoop Import failed with exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException

New Contributor

Sqoop importing as parquet file fires the issue. I don't have issues importing as text file. Not able to import with parquet or avro data.

Here is the exception

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException at at at at at at at at org.apache.sqoop.mapreduce.DataDrivenImportJob.configureMapper( at org.apache.sqoop.mapreduce.ImportJobBase.runImport( at org.apache.sqoop.manager.SqlManager.importTable( at org.apache.sqoop.manager.MySQLManager.importTable( at org.apache.sqoop.tool.ImportTool.importTable( at at at at org.apache.sqoop.Sqoop.runSqoop( at org.apache.sqoop.Sqoop.runTool( at org.apache.sqoop.Sqoop.runTool( at org.apache.sqoop.Sqoop.main( Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.metastore.api.NoSuchObjectException at$ at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( ... 19 more


Rising Star

@Santosh Kum Use --as-avrodatafile or --as-parquetfie in the sqoop commnad line options for respective formats.

Also check if you SQOOP_HOME/lib contains parqust and avro jar files.