Exception:
10/04/14 10:10:17 ERROR conf.Configuration: Failed to set setXIncludeAware(true) for parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@65b60280: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:1053)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1029)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:979)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:381)
at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:1630)
at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:184)
at com.ibm.webahead.steer.importer.hadoop.item.RecDataHadoopLoader.prepareJob(RecDataHadoopLoader.java:149)
at com.ibm.webahead.steer.importer.hadoop.item.RecDataHadoopLoader.run(RecDataHadoopLoader.java:175)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at com.ibm.webahead.steer.importer.hadoop.item.RecDataHadoopLoader.main(RecDataHadoopLoader.java:181)
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:156)
解决办法:
删除依赖的包 xercesImpl-2.6.2.jar,使用JDK自身的解析器
Jar files like xerces-2.6.2.jar, crimson.jar, xalan.jar along
with jaxp.jar has older version SAXParserFactory. So all the above jar
files should be removed from class parh.
factory.setSchema(schema);
If SAXParserFactory is loaded from any of the older versions of JAXP, exception is thrown.
Let SAXParserFactory to be loaded from default J2SE 1.5. And it will work.
You must log in to post a comment.