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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/titer1/article/details/68947138

问题

配置完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>

猜你喜欢

转载自blog.csdn.net/titer1/article/details/68947138
今日推荐