AnsweredAssumed Answered

java.lang.ClassNotFoundException: com.mapr.streams.impl.producer.MarlinProducer

Question asked by CCHEN on Mar 28, 2018
Latest reply on Apr 2, 2018 by lydon_bigriver

Hi,

 

So I've been working on a project with MapR streaming and Spark Streaming. I am running my Spark Job on an edge node which constantly query a database and produce the data to a MapR topic. In some occasion, my producer program just stops and throws an exception : 

java.lang.RuntimeException: Error occurred while instantiating com.mapr.streams.impl.producer.MarlinProducer.

==> com.mapr.streams.impl.producer.MarlinProducer.

                at org.apache.kafka.clients.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:41)

                at org.apache.kafka.clients.producer.KafkaProducer.initializeProducer(KafkaProducer.java:261)

                at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:515)

                at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:442)

Caused by: java.lang.ClassNotFoundException: com.mapr.streams.impl.producer.MarlinProducer

                at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

                at java.lang.Class.forName0(Native Method)

                at java.lang.Class.forName(Class.java:264)

                at org.apache.kafka.clients.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:31)

                ... 19 more

 

My guess is that might have something to do with how MapR is configured on my edge node. But I would like an answer from someone that has expertise on the subject matter about what could potentially causes this issue. 

 

Thank you!

Outcomes