javax.jdo.option.ConnectionURL配置的問題

    Hive安裝過程當中出現 The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.問題,具體以下所示:java

[Fatal Error] hive-site.xml:132:95: The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.mysql

14/10/23 11:15:04 FATAL conf.Configuration: error parsing conf file:/usr/local/apache-hive-0.13.1-bin/conf/hive-site.xmlsql

org.xml.sax.SAXParseException; systemId: file:/usr/local/apache-hive-0.13.1-bin/conf/hive-site.xml; lineNumber: 132; columnNumber: 95; The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.apache

    由於hive-site.xml中的javax.jdo.option.ConnectionURL配置項引發的,以下所示:編碼

<property>spa

<name>javax.jdo.option.ConnectionURL</name>xml

<value>jdbc:mysql://localhost:3306/hive_hdp?characterEncoding=UTF-8&createDatabaseIfNotExist=true</value>ip

<description>JDBC connect string for a JDBC metastore</description>string

</property>it

    正確配置以下:

<property>

<name>javax.jdo.option.ConnectionURL</name>

<value>jdbc:mysql://localhost:3306/hive_hdp?characterEncoding=UTF-8&createDatabaseIfNotExist=true</value>

<description>JDBC connect string for a JDBC metastore</description>

</property>

    這是由於xml文件中的編碼規則引發的。

    在xml文件中有如下幾類字符要進行轉義替換以下表所示:

    因此javax.jdo.option.ConnectionURL項中的&符號須要用&表示。

相關文章
相關標籤/搜索