Details
-
Type: Task
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.0
-
Fix Version/s: None
-
Component/s: api
-
Labels:None
Description
Hi,
I am using sqoop-1.2.0 and OraOop with Apache Hadoop 0.20.2. I am able
to login to oracle db and see tables but when I am trying to import
data from oracle to HDFS I am getting following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
hadoop/mapreduce/lib/db/DBWritable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
com.cloudera.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java :
1091)
at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:990)
at com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:
82)
at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:
337)
at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.lib.db.DBWritable
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Later I found out that ScoopRecord.java uses DBWritable and is a part
of mapreduce package in Cloudera distibution whereas in apache hadoop
it is in mapred package. Am I missing something here ? Do I need to
modify and build the code or is there a quick solution for this?
Thanks,
Saurabh