nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

rhive.connect() error #87

Open srikanth0863 opened 9 years ago

srikanth0863 commented 9 years ago

Hi, Except rhive.init() and rhive.env(), all rhive. commands produce following exception:

The below exception is thrown on rhive.connect(). ERROR conf.Configuration: Failed to set setXIncludeAware(true) for parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@174cb19e: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:614) 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 org.apache.hadoop.conf.Configuration.getInt(Configuration.java:485) at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:216) at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:203) at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:89) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1386) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1404) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123) at com.nexr.rhive.hadoop.FSUtils.checkFileSystem(FSUtils.java:24) 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:606) at RJavaTools.invokeMethod(RJavaTools.java:386) Error: Failed to connect to hdfs://localhost:9000.

I understand there's a version mismatch of R with Hadoop. I'm using the following components and versions: Java-1.7.0_60-ea R- 3.1.1 Rserve-1.7-3 rJava-0.9.6 Hadoop-2.2.0 Hive-0.11.0.2

Help me to correct the same. Thanks.

haintbk commented 9 years ago

I had the same problem and I solved by running below R command line: .jcall("java/lang/System","S","setProperty","javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl")