AnsweredAssumed Answered

java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetParsingDone()V.

Question asked by Vikram on Mar 27, 2018
Latest reply on Apr 6, 2018 by maprcommunity

Hi,

  I'm trying to run a simple program to get the list of topics from maprstreams path. I'm using the Kafka consumer api listTopics(streamPathName) to get the topic names. 

I have MapR 6.0 MEP 4.0

I have set MAPR_HOME to /opt/mapr

I have set LD_LIBRARY_PATH to $MAPR_HOME/lib:$MAPR_HOME/bin

 

I'm not sure what could be causing UnsatisfiedLinkError even though I have set LD_LIBRARY_PATH

 

I tried the follwoing command and I got the same error

java -cp ./test.jar:$MAPR_HOME/lib/*:./kafka-clients-0.9.0.0-mapr-1710.jar:  App2

 

java -cp ./test.jar:$MAPR_HOME/lib/*:./kafka-clients-0.9.0.0-mapr-1710-streams-6.0.0.jar  App2

 

Here is the error I'm seeing: 

 

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at App2.getSetOfTopics(App2.java:71)
at App2.main(App2.java:111)
Caused by: java.lang.RuntimeException: Error occurred while instantiating com.mapr.streams.impl.listener.MarlinListener.
==> java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetParsingDone()V.
at org.apache.kafka.clients.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:41)
at org.apache.kafka.clients.consumer.KafkaConsumer.initializeConsumer(KafkaConsumer.java:616)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:596)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:555)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.kafka.clients.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:38)
... 9 more
Caused by: 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:251)
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<init>(CLDBRpcCommonUtils.java:93)
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<clinit>(CLDBRpcCommonUtils.java:83)
at org.apache.hadoop.conf.CoreDefaultProperties.<clinit>(CoreDefaultProperties.java:69)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2159)
at org.apache.hadoop.conf.Configuration.getProperties(Configuration.java:2374)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2591)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2543)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2456)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:994)
at org.apache.hadoop.conf.Configuration.getTrimmed(Configuration.java:1044)
at org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1445)
at org.apache.hadoop.fs.FileSystem$Cache.getCacheMap(FileSystem.java:2712)
at org.apache.hadoop.fs.FileSystem$Cache.<init>(FileSystem.java:2703)
at org.apache.hadoop.fs.FileSystem.<clinit>(FileSystem.java:112)
at com.mapr.streams.impl.listener.MarlinListenerImpl.<init>(MarlinListenerImpl.java:166)
at com.mapr.streams.impl.listener.MarlinListener.<init>(MarlinListener.java:61)
... 14 more

Outcomes