PIG - Found interface org apache hadoop mapreduce JobContext but class was expected

0 votes

I was trying to load a table from hive. I am using Hcatalog for that.

I logged into hive using

pig -useHCatalog

i export almost all jars from hive and hadoop

register 'hdfs://localhost:8020/user/pig/jars/hive-jdbc-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-exec-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-common-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-metastore-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/mysql-connector-java-5.1.28-bin.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-beeline-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-builtins-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-cli-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-contrib-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-hbase-handler-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-hwi-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-metastore-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-pdk-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-serde-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-service-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hive-shims-0.10.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/antlr-2.7.7.jar';
register 'hdfs://localhost:8020/user/pig/jars/antlr-runtime-3.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/avro-1.7.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/hcatalog-core-0.5.0-incubating.jar';
register 'hdfs://localhost:8020/user/pig/jars/hcatalog-pig-adapter-0.5.0-incubating.jar';
register 'hdfs://localhost:8020/user/pig/jars/avro-ipc-1.7.4-tests.jar';
register 'hdfs://localhost:8020/user/pig/jars/avro-mapred-1.7.4-hadoop2.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-cli-1.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-codec-1.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-collections-3.2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-compress-1.4.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-configuration-1.6.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-dbcp-1.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-io-2.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-lang-2.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-logging-1.0.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-logging-api-1.0.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-logging-1.0.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-pool-1.5.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/datanucleus-api-jdo-3.2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/datanucleus-core-3.2.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/datanucleus-rdbms-3.2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/derby-10.4.2.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/guava-11.0.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/hbase.jar';
register 'hdfs://localhost:8020/user/pig/jars/jackson-xc-1.8.8.jar';
register 'hdfs://localhost:8020/user/pig/jars/activation-1.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/ant-contrib-1.0b3.jar';
register 'hdfs://localhost:8020/user/pig/jars/asm-3.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/avro-compiler-1.7.4.jar';
register 'hdfs://localhost:8020/user/pig/jars/cloudera-jets3t-2.0.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-beanutils-1.7.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-beanutils-core-1.8.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-digester-1.8.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-el-1.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-httpclient-3.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-io-2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-lang-2.5.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-logging-1.1.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-math-2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/commons-net-3.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/jersey-core-1.8.jar';
register 'hdfs://localhost:8020/user/pig/jars/jersey-json-1.8.jar';
register 'hdfs://localhost:8020/user/pig/jars/jersey-server-1.8.jar';
register 'hdfs://localhost:8020/user/pig/jars/jets3t-0.6.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/jettison-1.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/jetty-6.1.26.cloudera.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/jetty-util-6.1.26.cloudera.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/jsch-0.1.42.jar';
register 'hdfs://localhost:8020/user/pig/jars/jsp-api-2.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/jsr305-1.3.9.jar';
register 'hdfs://localhost:8020/user/pig/jars/junit-4.8.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/kfs-0.2.2.jar';
register 'hdfs://localhost:8020/user/pig/jars/kfs-0.3.jar';
register 'hdfs://localhost:8020/user/pig/jars/log4j-1.2.17.jar';
register 'hdfs://localhost:8020/user/pig/jars/mockito-all-1.8.5.jar';
register 'hdfs://localhost:8020/user/pig/jars/paranamer-2.3.jar';
register 'hdfs://localhost:8020/user/pig/jars/protobuf-java-2.4.0a.jar';
register 'hdfs://localhost:8020/user/pig/jars/servlet-api-2.5.jar';
register 'hdfs://localhost:8020/user/pig/jars/slf4j-api-1.6.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/stax-api-1.0.1.jar';
register 'hdfs://localhost:8020/user/pig/jars/xmlenc-0.52.jar';
register 'hdfs://localhost:8020/user/pig/jars/zookeeper-3.4.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/original-parquet-pig-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/original-parquet-pig-bundle-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/original-parquet-thrift-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/parquet-hive-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/parquet-pig-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/parquet-pig-bundle-1.2.5-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hadoop-core-2.0.0-mr1-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hadoop-core.jar';
register 'hdfs://localhost:8020/user/pig/jars/hadoop-mapreduce-client-core-2.0.0-cdh4.5.0.jar';
register 'hdfs://localhost:8020/user/pig/jars/hadoop-mapreduce-client-core.jar';

i tried this command also

ant clean jar -Dhadoopversion=23'

Is it a version mismatch problem?

I am using Hadoop 2.0.0-cdh4.5.0 and pig-0.12.0-src

please help

Oct 10, 2018 in Big Data Hadoop by slayer
• 29,370 points
1,092 views

1 answer to this question.

0 votes

Yes, it is a compatibility issue.

You can see that Hadoop 2 is not listed as compatible with Pig 0.12:

Requirements
Mandatory

Unix and Windows users need the following:

Hadoop 0.20.2, 020.203, 020.204, 0.20.205, 1.0.0, 1.0.1, or 0.23.0, 0.23.1 

http://pig.apache.org/docs/r0.12.0/start.html

answered Oct 10, 2018 by Omkar
• 69,220 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop Pig: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/Filter

This seems like a problem with the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 69,220 points
2,042 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

This seems like a path issue. Add the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 69,220 points
12,698 views
0 votes
1 answer

expected org.apache.hadoop.io.IntWritable, received org.apache.hadoop.io.LongWritable

Hey George!  This error comes whenever you use ...READ MORE

answered Jan 25, 2019 in Big Data Hadoop by Omkar
• 69,220 points
1,296 views
0 votes
1 answer

What do we exactly mean by “Hadoop” – the definition of Hadoop?

The official definition of Apache Hadoop given ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by Shubham
1,874 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,028 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,536 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,832 views
0 votes
1 answer

Hadoop Mapreduce: Class Not Found Exception

Try adding this Job job = new Job(conf, ...READ MORE

answered Oct 29, 2018 in Big Data Hadoop by Omkar
• 69,220 points
4,039 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP