我是R编程的新手。
我正在尝试使用rhive.connect()
连接到配置单元。
我知道“org.apache.xerces.jaxp.DocumentBuilderFactoryImpl”解析器可能存在一些不匹配。
我该如何解决这个问题?
ERROR conf.Configuration: Failed to set setXIncludeAware(true) for parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@1f9bb21f:java.lang.UnsupportedOperationException: setXIncludeAware is not supported on this JAXP implementation or earlier: class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
java.lang.UnsupportedOperationException: setXIncludeAware is not supported on this JAXP implementation or earlier: class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.setXIncludeAware(DocumentBuilderFactory.java:589)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1143)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1119)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1063)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:416)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at RJavaTools.invokeMethod(RJavaTools.java:386)
Error: Failed to connect to hdfs://localhost:9000.
如果我的理解是错误的,请帮助我理解。
我注意到/usr/lib64/R/etc/Makeconf
文件正在尝试使用R CMD javareconf
命令生效。 Makeconf
的配置文件是R
吗?
感谢。
答案 0 :(得分:0)
我遇到了同样的问题,我在R命令行下面运行解决了:
.jcall("java/lang/System","S","setProperty","javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl")