AnsweredAssumed Answered

remote java application connecting to MapR via Hcatalog API

Question asked by ooyedipe on Aug 21, 2014
Latest reply on Aug 21, 2014 by kiran_kumar_mavatoor
Hi,
  Do you have the installations steps that would be required to allow a remote java application connect to a MapR cluster and access tables via the HCatalog API

I read the documentation provided on the mapr website

http://doc.mapr.com/display/MapR/Accessing+MapR-FS+in+Java+Applications

and I’ve placed the listed jars within the classpath of our java application, but I’m still getting an error:
<pre><code>
java.lang.ExceptionInInitializerError: null
        at com.mapr.fs.ShimLoader.load(ShimLoader.java:214) ~[na:na]
        at org.apache.hadoop.conf.MapRConf.<clinit>(MapRConf.java:21) ~[na:na]
        at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1347) ~[na:na]
        at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1284) ~[na:na]
        at org.apache.hadoop.conf.Configuration.set(Configuration.java:545) ~[na:na]
      ...
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_43]
Caused by: java.lang.RuntimeException: Failure loading MapRClient.
        at com.mapr.fs.ShimLoader.injectNativeLoader(ShimLoader.java:283) ~[na:na]
        at com.mapr.fs.ShimLoader.load(ShimLoader.java:194) ~[na:na]
        ... 18 common frames omitted
Caused by: java.io.IOException: /com/mapr/fs/jni/MapRConstants.class is not found
        at com.mapr.fs.ShimLoader.getByteCode(ShimLoader.java:110) ~[na:na]
        at com.mapr.fs.ShimLoader.injectNativeLoader(ShimLoader.java:240) ~[na:na]
</pre></code>

Outcomes