[root@master sqoop-1.99.7]# sqoop2-tool verify
Setting conf dir: /usr/local/apps/sqoop-1.99.7/bin/../conf
Sqoop home directory: /usr/local/apps/sqoop-1.99.7
Sqoop tool executor:
Version: 1.99.7
Revision: 435d5e61b922a32d7bce567fe5fb1a9c0d9b1bbb
Compiled on Tue Jul 19 16:08:27 PDT 2016 by abefine
Running tool: class org.apache.sqoop.tools.tool.VerifyTool
0 [main] INFO org.apache.sqoop.core.SqoopServer – Initializing Sqoop server.
41 [main] INFO org.apache.sqoop.core.PropertiesConfigurationProvider – Starting config file poller thread
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/apps/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apps/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
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:1357)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1338)
at org.apache.sqoop.security.authentication.SimpleAuthenticationHandler.secureLogin(SimpleAuthenticationHandler.java:37)
at org.apache.sqoop.security.AuthenticationManager.initialize(AuthenticationManager.java:98)
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:57)
at org.apache.sqoop.tools.tool.VerifyTool.runTool(VerifyTool.java:36)
at org.apache.sqoop.tools.ToolRunner.main(ToolRunner.java:72)

解决方案

find /usr/local/apps/sqoop-1.99.7/ -name guava*.jar

删除并替换所有guava-11.0.2.jar

rm -f server/lib/guava-11.0.2.jar

cp /usr/local/apps/hive/lib/guava-27.0-jre.jar server/lib/

[root@master sqoop-1.99.7]# rm -f tools/lib/guava-11.0.2.jar
[root@master sqoop-1.99.7]# cp /usr/local/apps/hive/lib/guava-27.0-jre.jar tools/lib/
[root@master sqoop-1.99.7]# rm -f shell/lib/guava-11.0.2.jar
[root@master sqoop-1.99.7]# cp /usr/local/apps/hive/lib/guava-27.0-jre.jar shell/lib/

发表评论

电子邮件地址不会被公开。 必填项已用*标注