error in mapreduce program : Exception in thread "main" java.lang.VerifyError error in mapreduce program : Exception in thread "main" java.lang.VerifyError hadoop hadoop

error in mapreduce program : Exception in thread "main" java.lang.VerifyError


Another reason is using google-collections and guava in the same time. As a result i see the following stacktrace:

[Loaded com.google.common.collect.Interners from file:/var/lib/tomcat6-crm/webapps/ROOT/WEB-INF/lib/**guava**-11.0.2.jar][Loaded com.google.common.base.Function from file:/var/lib/tomcat6-crm/webapps/ROOT/WEB-INF/lib/**google-collections**-1.0.jar][Loaded com.google.common.collect.GenericMapMaker from file:/var/lib/tomcat6-crm/webapps/ROOT/WEB-INF/lib/guava-11.0.2.jar][Loaded com.google.common.collect.MapMaker from file:/var/lib/tomcat6-crm/webapps/ROOT/WEB-INF/lib/google-collections-1.0.jar]

Exclude google-collection from dependency tree to avoid conflicts;

To see the class loading use -XX:+TraceClassLoading JVM option


this is a late response but I actually ran into the same problem so I thought I would put my solution to avoid this situation: http://xkcd.com/979/

In my case it was dut to the fact that I had a wrong dependency in my pom.I running cloudera and was trying to connect using the standard jdbc client.

To connect to cdh, use the dependencies listed there:http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.0/CDH4-Installation-Guide/cdh4ig_topic_31.html

or whichever version of cloudera you are using

So the dependencies of your client should look like:

    <dependency>        <groupId>org.apache.hadoop</groupId>        <artifactId>hadoop-client</artifactId>        <version>2.0.0-mr1-cdh4.0.0</version>    </dependency>

and not:

    <dependency>        <groupId>org.apache.hadoop</groupId>        <artifactId>hadoop-client</artifactId>        <version>2.2.0</version>    </dependency>

Also, pay attention to the kind of hadoop running, YARN or mr1.

Of course your problem might be different, but I still hope this helps.