MapR client invocation on Mac OS X fails with java.lang.UnsatisfiedLinkError: no MapRClient in java.library.path

Document created by wade on Feb 27, 2016
Version 1Show Document
  • View in full screen mode

Author: Jitendra Yadav

 

Original Publication Date: May 1, 2015

 

Environment

  • Mac OS-X
  • MapR 3.x

 

Symptom

When starting Java program from a Mac OS node with MapR client installed, the following exception is seen

Exception in thread "main" java.lang.UnsatisfiedLinkError: no MapRClient in java.library.path 
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045) at com.mapr.fs.MapRFileSystem.(MapRFileSystem.java:959)
at java.lang.Class.forName0(Native Method)

Root Cause
     The application classpath is missing the Hadoop native jars required for the filesystem to be accessed.

Solution

Add the parameter below to the java arguments while running the application :

"-Djava.library.path=/opt/mapr/hadoop/hadoop-0.20.2/lib/native/Mac_OS_X-x86_64-64"

Attachments

    Outcomes