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

相关文章

来自专栏后端之路

android 4.0 启动 Launcher 分析(1)

1.配置文件 (1)packege 属性可指定生成的gen源文件夹的包名,同时也表示程序运行时的进程名称 original-package 表示源码中真实的源...

1789
来自专栏向治洪

android之listview缓存图片(缓存优化)

网上关于这个方面的文章也不少,基本的思路是线程+缓存来解决。下面提出一些优化: 1、采用线程池 2、内存缓存+文件缓存 3、内存缓存中网上很多是采用SoftRe...

2489
来自专栏后端之路

Dubbo之telnet实现

我们可以通过telnet来访问道对应dubbo服务的信息 比如 ? 我们可以利用一些指令来访问。 我们知道,默认情况下,dubbo使用netty做transpo...

3109
来自专栏个人分享

初版storm项目全流程自动化测试代码实现

  由于项目需要,写了版针对业务的自动化测试代码,主要应用场景在于由于业务日趋复杂,一些公共代码的改动,担心会影响已有业务。还没进行重写,但知识点还是不少的与大...

501
来自专栏后端之路

二维码扫描登录实现

下面介绍一个简单的二维码扫描登录的实现 首先定义扫描实体对象 package com.air.tqb.vo.scan; import com.air.tqb...

5569
来自专栏码匠的流水账

springboot2自定义statsd指标前缀

springboot2引入了micrometer,1.x版本的spring.metrics.export.statsd.prefix在2版本中已经被标记为废弃,...

492
来自专栏

Spring MVC基于注解的Junit测试

INFO : org.springframework.test.context.TestContextManager - @TestExecutionList...

675
来自专栏你不就像风一样

SpringBoot整合Mybatis使用注解或XML的方式开发

[User{id=1, name='name', age=18}, User{id=2, name='name2', age=19}, User{id=3, n...

532
来自专栏Jerry的SAP技术分享

使用Java connector消费ABAP系统的函数

Java Connector(JCO)环境的搭建:Step by step to download and configure JCO in your lapt...

1602
来自专栏Android开发指南

5.AsyncHttp、post

2737

扫码关注云+社区