Caused by: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml

1:Hive安装的过程(Hive启动的时候报的错误),贴一下错误,和为什么错,以及解决方法:

 1 [root@master bin]# ./hive
 2 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive
 3 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize
 4 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize
 5 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size.per.rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack
 6 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size.per.node is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.node
 7 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
 8 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative
 9 [Fatal Error] hive-site.xml:5:2: The markup in the document following the root element must be well-formed.
10 17/12/11 23:22:57 FATAL conf.Configuration: error parsing conf file:/home/hadoop/hive-0.12.0/conf/hive-site.xml
11 org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed.
12     at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
13     at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
14     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
15     at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2173)
16     at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2161)
17     at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229)
18     at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195)
19     at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2102)
20     at org.apache.hadoop.conf.Configuration.get(Configuration.java:1068)
21     at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1141)
22     at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:1087)
23     at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
24     at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
25     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:630)
26     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
27     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
28     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
29     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
30     at java.lang.reflect.Method.invoke(Method.java:606)
31     at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
32 Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed.
33     at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2338)
34     at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195)
35     at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2102)
36     at org.apache.hadoop.conf.Configuration.get(Configuration.java:1068)
37     at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1141)
38     at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:1087)
39     at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
40     at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
41     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:630)
42     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
43     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
44     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
45     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
46     at java.lang.reflect.Method.invoke(Method.java:606)
47     at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
48 Caused by: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed.
49     at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
50     at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
51     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
52     at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2173)
53     at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2161)
54     at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229)
55     ... 14 more

2:我的错误主要是配置Hive-site.xml的时候少写了开头和结尾的<configuration></configuration>,导致的错误,下面贴一下这个配置文件易错的地方:

 1 <!--开头和结尾,一定不要忘记-->
 2 <configuration>
 3 <property>
 4 <name>javax.jdo.option.ConnectionURL</name>
 5 <!--自己的主机名称或者localhost-->
 6 <value>jdbc:mysql://主机名称:3306/hive?createDatabaseIfNotExist=true</value>
 7 </property>
 8 <property>
 9 <name>javax.jdo.option.ConnectionDriverName</name>
10 <value>com.mysql.jdbc.Driver</value>
11 </property>
12 <property>
13 <name>javax.jdo.option.ConnectionUserName</name>
14 <!--mysql的账号-->
15 <value>root</value>
16 </property>
17 <property>
18 <name>javax.jdo.option.ConnectionPassword</name>
19 <!--自己mysql的密码哦-->
20 <value>123456</value>
21 </property>
22 </configuration>

停更......

天霸动霸tua,加油.....

2017-12-12 15:32:47

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏Golang语言社区

Go调试简单的内存泄漏

Memory leaks are a class of bugs where memory is not released even after it is n...

1423
来自专栏我和未来有约会

silverlight beta 2 将在本周末发布.

太开心了,刚刚收到微软silverlight.net的邮件.  确定了 将在本周末发布beta2. 以下是部分邮件内容 引用: There are some...

1906
来自专栏CreateAMind

GTX 1080+Ubuntu16.04+CUDA8.0+cuDNN5.0+TensorFlow

GTX 1080+Ubuntu16.04+CUDA8.0+cuDNN5.0+TensorFlow 安装指导

1282
来自专栏CreateAMind

根据人类反馈进行强化学习+ 代码

https://github.com/nottombrown/rl-teacher

681
来自专栏云计算与大数据

How to Monitor Zookeeper

As per previous articles, our general rule of thumb is “collect all possible/rea...

864
来自专栏运维

DELL R710 服务器内存排错

man dmidecode 可以得到详细的介绍和使用方法,dmidecode - DMI table decoder,DMI (Desktop Manageme...

632
来自专栏Aloys的开发之路

Peer Code Reviews Made Easy with Eclipse Plug-In

Origin Article: Peer Code Reviews Made Easy with Eclipse Plug-In Origin Author: ...

1636
来自专栏WindCoder

How to Build an Effective Initial Deployment Pipeline

I love building things—what developer doesn’t? I love thinking up solutions to i...

491
来自专栏智能计算时代

Capturing Packets in Linux at a Speed of Millions of PPS

My article will tell you how to accept 10 million packets per second without usi...

3367
来自专栏CreateAMind

手把手教强化学习1: Q-learning 十步实现猫捉耗子视频及代码

601

扫码关注云+社区