异常 The processing instruction target matching [xX][mM][lL] is not allowed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Fatal Error] hive-site.xml:3:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
18/09/21 10:26:53 FATAL conf.Configuration: error parsing conf file:/home/hadoop/apache-hive-1.2.0-bin/conf/hive-site.xml
org.xml.sax.SAXParseException; systemId: file:/home/hadoop/apache-hive-1.2.0-bin/conf/hive-site.xml; lineNumber: 3; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2352)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2340)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2408)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2374)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2281)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1108)
at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:2605)




<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>

这个异常解释为:xml文件不能被解析,一般出现这样的问题在于xml格式上,并且问题多出现在xml文件的头部,这是因为xml文件头部有两行空行,第三行才开始写
总结:<?xml version=”1.0” encoding=”UTF-8”?>前面不要有任何其他字符,如空格、回车、换行这些否则就会出现上面的异常。

本文结束啦感谢您的阅读

本文标题:异常 The processing instruction target matching [xX][mM][lL] is not allowed

文章作者:Smartfoot

原始链接:http://blog.bestsmartfoot.top/2018/09/21/Error-xml-01/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

公众号