Hi Jarcec, Thanks for your reply. "hadoopverion" is a slip. I do use "-Dhadoopversion=20" and the exception is still there.
My Hadoop Cluster version: hadoop-0.20.2-cdh3u2 Regards, Hong On Thu, Dec 20, 2012 at 10:56 PM, Jarek Jarcec Cecho <[email protected]>wrote: > Hi Zhao, > the exception you're seeing is typical when Sqoop was compiled for > different Hadoop version that you're running on your cluster. > > Sqoop by default is compiling for hadoop 23. You can change that by > passing property -Dhadoopversion=20 as you tried to do. Unfortunately it > seems to me that you have typo in your command and you have "hadoopverion" > instead of "hadoopversion". You can check ant log for hadoop version that > build is using in order to be sure that you're building against version > that you need to. > > I would recommend to rebuild the project in case that you change the > hadoopversion parameter to force ant recompile all the classing again: > > ant clean jar-all -Dhadoopversion=20 > > Jarcec > > On Dec 20, 2012, at 4:36 AM, Zhao Hong <[email protected]> wrote: > > > Hi, > > I compiled branch-1.4.2 of sqoop with the command below. > > ant jar-all -Dhadoopverion=20 > > and the result is totally successful. > > > > When I try to import some data from oracle database using the sqoop > that I > > built , I got the exception : "Exception in thread "main" > > java.lang.IncompatibleClassChangeError: Found class > > org.apache.hadoop.mapreduce.JobContext, but interface was expected." > > > > I cant get the right result when run the same command using the sqoop > from > > the org and my hadoop version is hadoop-0.20.2-cdh3u2. > > > > So, my question is how should I compile the sqoop to work with my hadoop. > > > > Thanks & Regards. > > > > Hong > >
