Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive throws: WstxParsingException: Illegal character entity: expansion character (code 0x8)

Tags:

hadoop

hive

I installed hadoop and hive following this tutorial. The tutorial is outdated so I used the current versions. When I start hive I get the following error:

hive SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8 at [row,col,system-id]: [3210,96,"file:.../software/apache-hive-3.1.0-bin/conf/hive-site.xml"] at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3003) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2931) at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2806) at org.apache.hadoop.conf.Configuration.get(Configuration.java:1460) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:4990) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:5063) at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5150) at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:5093) at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97) at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:699) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:318) at org.apache.hadoop.util.RunJar.main(RunJar.java:232)

I had a look at the specified file and found this entry:

<description>
  Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for&#8;transactional tables.  This ensures that inserts (w/o overwrite) running concurrently
  are not hidden by the INSERT OVERWRITE.
</description>

I am running on Ubuntu 16.04, hive 3.1.0, derby 10.8.1.2, hadoop 3.1.1, Java: openjdk version "1.8.0_181" . I added some lines to the file for configuration as outlined in the tutorial, though I did not touch this lines at all. Do I have to download a different version of hive?

like image 452
Soren Avatar asked Oct 12 '18 16:10

Soren


2 Answers

You have something like this in hive-site.xml

Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks fortransactional tables. This ensures that inserts (w/o overwrite) running concurrently are not hidden by the INSERT OVERWRITE.

It is throwing that error, as there is a special character () between the words for and transactional. Either delete that character or copy and paste (replace) which is in between <description> and </description>.

<description>
     Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for 
     transactional tables. This ensures that inserts (w/o overwrite) running concurrently
     are not hidden by the INSERT OVERWRITE.
</description>
like image 199
pvy4917 Avatar answered Nov 16 '22 01:11

pvy4917


Remove Special charters at 3210,96 line and column and just re-run the hive. [3210,96,"file:/usr/local/hive/conf/hive-site.xml"]

like image 4
Kanthishere Avatar answered Nov 16 '22 01:11

Kanthishere