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 条评论
登录 后参与评论

相关文章

来自专栏腾讯高校合作

深圳大学校长李清泉谈地方高校探索高校改革

近日深圳大学校长李清泉做客人民网百名校长访谈录节目。与网友们一起交流深圳大学在高校体制改革中的新使命和新举措。 采访原文链接:http://edu.people...

3516
来自专栏程序员互动联盟

人过三十才想明白的那点事:送给奋斗路上的强者

在当今社会结构下,人要出头,要在物质上成功,大家共同的切身感受就是官、商、明星及各个领域顶尖人才,才可以过上一劳永逸的生活,普通百姓就是庸碌一生为其效力的工蚁,...

3355
来自专栏黑白安全

研究生入侵全国选号系统“秒抢”靓车牌 3年买下上海两套房

你想不到的是,“黑客”入侵互联网预选号牌系统,就能把各种靓号车牌“秒杀”了,然后以数万元不等的价格卖给车主,非法牟取暴利。这不是电影《黑客帝国》里的情节,事情真...

1042
来自专栏量子位

算法取代了保释金:被抓能不能保释?先听系统怎么说

加州州长杰里·布朗 (Jerry Brown) 已经签署了SB10法案,废除现金保释制度。

902
来自专栏机器人网

波士顿动力机器人离下一次震惊世界还需要一点时间,搬箱子不成反摔倒

波士顿动力稍有动静就会引发轰动,这次也不例外。一段最新流出的视频显示了波士顿动力的Atlas机器人试着搬箱子然后放到架子上——尝试很久未果,最终无情倒下。此前业...

3466
来自专栏新智元

【允悲】波士顿动力机器人跪了!搬箱子不成反摔倒

【新智元导读】波士顿动力稍有动静就会引发轰动,这次也不例外。一段最新流出的视频显示了波士顿动力的Atlas机器人试着搬箱子然后放到架子上——尝试很久未果,最终无...

3306
来自专栏VRPinea

用VR的视角让你看看,灾难和化学武器离我们有多近

36710
来自专栏一场梦

关于程序员的笑话

842
来自专栏区块之恋

EOS暴涨40%+之后1.2.3.4.

1544
来自专栏大数据文摘

只有CEO才玩得起的奢侈运动

3358

扫码关注云+社区