配置hive的坑 hive-site.xml:2787:3: The element type "configuration" must be terminated by the matching

问题

配置完hive,运行遇到以下问题

hive-site.xml:2787:3: The element type "configuration" must be terminated by the matching end-tag "</configuration>

现象

详细的输出是

“`xml
[Fatal Error] hive-site.xml:2787:3: The element type “configuration” must be terminated by the matching end-tag “”.
17/04/01 18:03:12 FATAL conf.Configuration: error parsing conf file:/usr/local/hive/conf/hive-site.xml
org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2325)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2313)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2381)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2347)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2254)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1081)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1526)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:1471)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:649)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Exception in thread “main” java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2490)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2347)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2254)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1081)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1526)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:1471)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:649)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2325)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2313)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2381)
… 14 more
““

解决方案

line 2783后面,官方模板缺少一个

<property>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值