sqoop 1.4.6导数据报错,It seems as though you are running sqoop with a JRE

xzg1109 2017-11-26 11:37:38
[root@master bin]# sqoop import -m 1 --connect jdbc:mysql://master:3306/mysql --username root --password Mysql5718% --table user --target-dir /user/hdfs/testdata/
Warning: /opt/sqoop1.4.6/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /opt/sqoop1.4.6/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hbase/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hbase/lib/spark-assembly-1.6.3-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hbase/lib/spark-examples-1.6.3-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
17/11/26 11:24:19 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
17/11/26 11:24:19 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
17/11/26 11:24:19 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
17/11/26 11:24:19 INFO tool.CodeGenTool: Beginning code generation
17/11/26 11:24:20 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user` AS t LIMIT 1
17/11/26 11:24:20 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user` AS t LIMIT 1
17/11/26 11:24:20 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/hadoop
17/11/26 11:24:20 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE.
17/11/26 11:24:20 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code.
17/11/26 11:24:20 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it.
17/11/26 11:24:20 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start Java compiler.
at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:187)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:108)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

[root@master bin]# java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
[root@master bin]# which java
/usr/java/jdk1.7.0_79/bin/java
[root@master bin]#

查看JDK版本,也没问题,哪位大神知道原因,指点下,拜谢!
...全文
683 2 点赞 打赏 收藏 举报
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
xzg1109 2017-12-14
换个路径,装了个JAVA8问题解决。
  • 打赏
  • 举报
回复
xzg1109 2017-11-26
[root@master ~]# echo $JAVA_HOME /usr/java/jdk1.7.0_79 [root@master ~]# 查看 $JAVA_HOME,也没问题。
  • 打赏
  • 举报
回复
相关推荐
发帖
Hadoop生态社区
加入

2.0w+

社区成员

Hadoop生态大数据交流社区,致力于有Hadoop,hive,Spark,Hbase,Flink,ClickHouse,Kafka,数据仓库,大数据集群运维技术分享和交流等
申请成为版主
帖子事件
创建了帖子
2017-11-26 11:37
社区公告
暂无公告