0

I am getting below error while starting Hive

root@ubuntu:~# hive
[Fatal Error] hive-default.xml:1:1: Content is not allowed in prolog.
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1401)
    at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1269)
    at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1200)
    at org.apache.hadoop.conf.Configuration.get(Configuration.java:415)
    at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:663)
    at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:595)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:434)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
    at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1300)
    ... 11 more
root@ubuntu:~# 

Some one please help me to fix this issue. Thanks in advance.

Devin
  • 7,690
  • 6
  • 39
  • 54
kunaal
  • 23
  • 1
  • 7
  • possible duplicate of [Content is not allowed in Prolog SAXParserException](http://stackoverflow.com/questions/4569123/content-is-not-allowed-in-prolog-saxparserexception) – FuzzyTree Sep 26 '14 at 21:19

1 Answers1

0

As you can see, the error is coming due to the hive-default.xml

Please have a look at this file. There might be a white space or any other text at the starting of the xml file which is causing the error You can refer this question on stackoverflow org.xml.sax.SAXParseException: Content is not allowed in prolog which has the same error as you got, just for a different file

hive-default.xml.template is located in the conf directory in your installation root.

You might want to create hive-site.xml to override the default values

Community
  • 1
  • 1
addicted20015
  • 644
  • 7
  • 16