Hadoop “Failed to set setXIncludeAware(true) for parser” 错误

2019-03-28 13:43|来源: 网络

Hadoop “Failed to set setXIncludeAware(true) for parser” 错误

今天使用Java连接Hbase的时候出现错误,异常如下:

ERROR conf.Configuration: Failed to set setXIncludeAware(true) for parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@47315d34:java.lang.UnsupportedOperationException:
This parser does not support specification "null" version "null"
java.lang.UnsupportedOperationException:
This parser does not support specification "null" version "null" at javax.xml.parsers.DocumentBuilderFactory.setXIncludeAware(DocumentBuilderFactory.java:590) at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1054) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1030) at

Hadoop版本1.0.1 ,Hbase版本 0.92.1。 原因是JDK提供的XML解析库过时了。将xerces 以及 xercesImpl加入classpath即可。

更多Hadoop相关信息见Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13

相关问答

更多
  • 我建议你使用新的API 此示例基于新API public class ChainJobs extends Configured implements Tool { private static final String OUTPUT_PATH = "intermediate_output"; @Override public int run(String[] args) throws Exception { /* * Job 1 */ Configuration conf = ...
  • 所以......我尝试使用mapreduce选项运行Pig脚本: pig -x mapreduce script.pig 它仍然失败,但它至少产生了一个有意义的错误。 我似乎不得不从CSV文件中删除标题,因为Pig使用标题行作为数据。 这似乎只有在使用浮点数时才会发生 - 如果使用带整数的相同脚本,则只会忽略标题行。 就是这样。 首先从文件中删除标题,而不是对它运行脚本 - 它工作。 So ... I tried running Pig script with mapreduce option: pig ...
  • 做了一个全新安装的hadoop并用同一个罐子运行工作,问题就消失了。 似乎是一个错误,而不是编程错误。 Did a fresh installation of hadoop and ran the job with the same jar, the problem disappeared. Seems to be a bug rather than programming errors.
  • 要启动它,请转到hadoop的sbin目录,然后键入命令 mr-jobhistory-server.sh start historyserver --config $HADOOP_CONF_DIR $HADOOP_CONF_DIR是hadoop的配置文件(如hdfs-site.xml等)驻留的目录。 To start it,go to hadoop's sbin dir and then type the command mr-jobhistory-server.sh start historyserve ...
  • 我认为您缺少凭证字典,即您应该传递访问Object Store服务的参数值,如下所示: credentials = { 'auth_uri':'', 'global_account_auth_uri':'', 'username':'admin_b055482b7febbd287d9020d65cdd55f5653d0ffb', 'password':"XXXXXX", 'auth_url':'https://identity.open.softlayer.com', 'proje ...
  • 与Cascading + libjars = ClassNotFoundException类似。 有时 , 我在hadoop-env.sh中添加了以下行并解决了问题 export HADOOP_CLASSPATH="path_to_cascading_libs/lib/*":$HADOOP_CLASSPATH Similar to Cascading + libjars = ClassNotFoundException. Sometimes , I added following line ...
  • 我不知道这是否是您的问题,但如果您不访问同一主机中的所有内容,则使用本地主机通常是个问题。 所以不要使用localhost! 一般来说不要改变localhost的定义。 Localhost是127.0.0.1的定义。 您将hbase.rootdir定义为hdfs:// master:54310 / hbase和hbase.zookeeper.quorum作为主。 什么是主人? 它确实应该是主机的主要以太网接口的完全限定的域名。 该接口的IP地址的反向DNS应该解析为您填入这些字段的相同FQDN。 (或者如果 ...
  • TaggedWritable类没有空构造函数,因此在应该读取序列化数据的reduce阶段,app会因为无法通过反射创建TaggedWritable键入键而TaggedWritable 。 您应该添加一个空构造函数。 您的地图阶段已成功完成,因为在地图阶段,您的映射器会TaggedWritable创建TaggedWritable类型的键。 This code solves the problem and gives the expected result. It is from here, public st ...
  • 错误不在config文件中,而在于你运行这些脚本的方式。 运行脚本的正确方式是留在hadoop-home并应用 启动群集 sbin/start-all.sh 停止群集 sbin/stop-all.sh 要么 你可以进入sbin目录并执行 启动群集 ./start-all.sh 停止群集 ./stop-all.sh The error is not with the config files but the way you run those scripts. Correct way to run t ...
  • 我按原样使用了您的代码,并在进行了3次修改后进行了编译: 在以下语句中,将filename更改为fileName ( fileName 'N'大写) 更改: word.set(itr.nextToken().toLowerCase().replaceAll("[^a-z]+","") +" "+ filename); 至: word.set(itr.nextToken().toLowerCase().replaceAll("[^a-z]+","") +" "+ fileName); 导入的包Gene ...