AnsweredAssumed Answered

UsatisficedLinkError after successfully loading native library

Question asked by masaharo on Dec 23, 2015
Latest reply on Dec 29, 2015 by tugdual
I am getting an UnsatisfiedLinkError after successfully loading native library.
I added System property for debugging output from ShimLoader.java (by adding a system variable -Dshimloader.debuglog=true), and got this as a proof that the native libraries are indeed loaded:

    2015-12-23 10:23:57,871 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.870 [179] Load in root Classloader: true.
    2015-12-23 10:23:57,872 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.872 [179] Injecting Native Loader
    2015-12-23 10:23:57,872 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.872 [179] getRootClassLoader: thread classLoader is 'org.jboss.modules.ModuleClassLoader'
    2015-12-23 10:23:57,873 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.873 [179] getRootClassLoader: root classLoader is 'sun.misc.Launcher.ExtClassLoader'
    2015-12-23 10:23:57,878 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.877 [179] injectNativeLoader: Loading MapR native classes
    2015-12-23 10:23:57,902 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.902 [179] Loaded native library from '/opt/mapr/lib'.
    2015-12-23 10:23:57,903 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.903 [179] Native Loader injected
    2015-12-23 10:23:57,907 ERROR [stderr] (Thread-1 (HornetQ-client-global-threads-475643245)) 2015-12-23 10:23:57.907 [179] MapR native classes already loaded
    
But, after succesfully loading the native library classes, I get an error:

    Caused by: java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetParsingDone()V
            at com.mapr.security.JNISecurity.SetParsingDone(Native Method) [baseutils-5.0.0-mapr.jar:]
            at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.init(CLDBRpcCommonUtils.java:231) [baseutils-5.0.0-mapr.jar:]
            at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<init>(CLDBRpcCommonUtils.java:73) [baseutils-5.0.0-mapr.jar:]
            at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<clinit>(CLDBRpcCommonUtils.java:63) [baseutils-5.0.0-mapr.jar:]
            at org.apache.hadoop.conf.CoreDefaultProperties.<clinit>(CoreDefaultProperties.java:69) [maprfs-5.0.0-mapr.jar:]
            at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_65]
            at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_65]
            at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2147) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.getProperties(Configuration.java:2362) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2579) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2531) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2444) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.get(Configuration.java:994) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.getTrimmed(Configuration.java:1044) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1445) [hadoop-common-2.7.0-mapr-1506.jar:]
            at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:71) [hbase-common-0.98.12-mapr-1506-m7-5.0.0.jar:]
            at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:107) [hbase-common-0.98.12-mapr-1506-m7-5.0.0.jar:]
            at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:122) [hbase-common-0.98.12-mapr-1506-m7-5.0.0.jar:]
    

Can you help me?

I have set up the MapR native client (including running the configure.sh), and set up java System variables:

    -Djava.library.path=/opt/mapr/lib
    -Dmapr.home.dir=/opt/mapr

But the error still continues. I am clueless.

Outcomes