Tag Archives: Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgumen

Hive Start Error: Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgumen

Error Messages:
Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1380)

at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

Cause:
The two guava.jar versions of hadoop and hive are inconsistent
The two locations are located in the following two directories.
– /usr/local/hive/lib/
– /usr/local/hadoop/share/hadoop/common/lib/

Solution:
Delete the lower version and copy the higher version to the lower version directory