Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

JNI Error when attempting to deploy new storm topology.

JNI Error when attempting to deploy new storm topology.

New Contributor

Hello, I am currently following this tutorial:

I have gotten to section 2.1, where I verified that Kafka is running and attempted to deploy a new storm topology using the command that is given in the tutorial. However, when I try to run the command I get the following output and error:


[mpoutas@sandbox iot-truck-streaming]$ storm jar storm-streaming/target/storm-streaming-1.0-SNAPSHOT.jar com.hortonworks.streaming.impl.topologies.TruckEventKafkaExperimTopology /etc/storm_demo/

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/usr/hdp/!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/home/mpoutas/iot-truck-streaming/storm-streaming/target/storm-streaming-1.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See for an explanation.

SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Running: /usr/jdk64/jdk1.8.0_60/bin/java -client -Dstorm.options= -Dstorm.home=/usr/hdp/ -Dstorm.log.dir=/var/log/storm -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib:/usr/hdp/current/storm-client/lib -Dstorm.conf.file= -cp /usr/hdp/ -Dstorm.jar=storm-streaming/target/storm-streaming-1.0-SNAPSHOT.jar com.hortonworks.streaming.impl.topologies.TruckEventKafkaExperimTopology /etc/storm_demo/

Error: A JNI error has occurred, please check your installation and try again

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/storm/topology/IRichBolt

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

at java.lang.Class.privateGetDeclaredMethods(

at java.lang.Class.privateGetMethodRecursive(

at java.lang.Class.getMethod0(

at java.lang.Class.getMethod(

at sun.launcher.LauncherHelper.validateMainClass(

at sun.launcher.LauncherHelper.checkAndLoadMain(

Caused by: java.lang.ClassNotFoundException: org.apache.storm.topology.IRichBolt


at java.lang.ClassLoader.loadClass(

at sun.misc.Launcher$AppClassLoader.loadClass(

at java.lang.ClassLoader.loadClass( ... 7 more


Can anyone help me figure out how to fix this error? Thanks.


Re: JNI Error when attempting to deploy new storm topology.


Hey Matt,

Looks like you are running this in HDP 2.4 which bundled Storm 0.10.0. It looks like you compiled the topology above using the more recent Storm 1.0 which includes a number of repackaging updates - including the IRichBolt class above. Update your Maven pom.xml to the earlier version of Storm and recompile and you should be good to go. Alternatively, you should be able to deploy the above topology on an HDP 2.5 distribution without an issue.

Good luck!


Re: JNI Error when attempting to deploy new storm topology.


Yeah, I believe all the tutorial content was updated to work in the current 2.5 version of the Sandbox/HDP distribution so would explain the issue you are seeing. You may have to update several of the of the pom dependencies to the versions that were included in HDP 2.4 to get it to run in your environment or just run your topology on HDP 2.5

Re: JNI Error when attempting to deploy new storm topology.

Rising Star


I'm facing the same problem using HDP 2.4 in fact.

How to update my pom.xml in Maven.

Many thanks in advance.

Don't have an account?
Coming from Hortonworks? Activate your account here