Classpath issues in MAPR

1.7k views Asked by At

Am running a MAPR client program. I get the following exception: java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetParsingDone()V at com.mapr.security.JNISecurity.SetParsingDone(Native Method) at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.init(CLDBRpcCommonUtils.java:222) at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.(CLDBRpcCommonUtils.java:72) at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.(CLDBRpcCommonUtils.java:63) at org.apache.hadoop.conf.CoreDefaultProperties.(CoreDefaultProperties.java:68) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:270) at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:1847) at org.apache.hadoop.conf.Configuration.getProperties(Configuration.java:2062) at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2272) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2224) at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2141) at org.apache.hadoop.conf.Configuration.get(Configuration.java:864) at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2068) at org.apache.hadoop.mapred.JobConf.(JobConf.java:420)

Looks like some libraries are missing. How to go about this?

1

There are 1 answers

0
Tug Grall On

If you are running your application on one or many nodes of the MapR Cluster, all the Jar are already there, if you are running from a different machine you should install and configure the MapR Client.

Then, which type of application are you using?

  1. Simple Java App runs with java -cp ... myClass ?
  2. a JavaEE/Web application ?

If you are running a simple Java App (1) you can use the hadoop classpath command when you run it, something like:

java -cp path/to/your.jar:`hadoop classpath`  you.package.your.class

If you want to run a Web application, you should put the Jars in the Global/Common loader of your container. What I do for this:

Create a new dir, and copy the hadoop jars in this folder

mkdir $HOME/lib_mapr/
cp /opt/mapr/hadoop/hadoop-0.20.2/lib/*.jar $HOME/lib_mapr/

Remove Jars that could be in conflicts with Tomcat :

cd $HOME/lib_mapr/

rm *servlet*.jar

rm jsp*.jar

rm jetty*.jar

For example, in Tomcat you can add the folder to the common loader

shared.loader=/Users/tgrall/lib_mapr/*.jar

If you are using MapR-DB in your application, on a Client Machine aka Edge Machine, you should manually copy the Jars from the server to this folder, or use the maprdb client package.