AnsweredAssumed Answered

[SQOOP] sqoop import-all-tables NullPointerException

Question asked by mandoz on Oct 11, 2015
Hello,

I'm getting the following nullpointerexception error when I try to run sqoop import-all-tables:

`sqoop import-all-tables --connect jdbc:mysql://10.212.1.20:3306/database_name --username user --password user_password --hive-import --as-parquetfile -m 5 --hive-database hive_database_name`

`15/10/09 13:02:17 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:97)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:111)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)`

But if I run sqoop import for a single table, it works fine:
`sqoop import --connect jdbc:mysql://10.212.1.20:3306/database_name --table table_name --username user --password user_password --hive-import --as-parquetfile --hive-database hive_database_name`

I really don't get the reason why this is happening. Any ideas?

Outcomes