Use Apache SAMOA with Apache Storm. First run: "ClassNotFoundException: backtype.storm.topology.TopologyBuilder"

397 Views Asked by At

I'm a beginner with Samoa and Storm. I'm studying Samoa for a Univerisity project. I read that in order to use Samoa I must use a SPE (Stream Processing Engine), like Storm.

So, I followed the steps on the official website of Apache Samoa and I typed this in my command line:

git clone http://git.apache.org/incubator-samoa.git

cd incubator-samoa

mvn -Pstorm package

Then, after the installation (all the test results were 'SUCCESS'), I followed this other guide to install Storm and Zookeeper: http://www.tutorialspoint.com/apache_storm/apache_storm_installation.htm. Everything seems ok.

Then, I continued to follow the Samoa's guide until the section "Getting Started", in which there are a run of an example. Here I encountered problems. I downloaded the example data set and unzipped it, as it is described and then I tried to run Samoa following the guide:

bin/samoa local target/SAMOA-Local-0.3.0-SNAPSHOT.jar "PrequentialEvaluation -l classifiers.ensemble.Bagging -s (ArffFileStream -f covtypeNorm.arff) -f 100000"

But, since the format of a Samoa task script is bin/samoa <platform> <jar> "<task>", I modified the command in this way:

bin/samoa storm target/SAMOA-Storm-0.4.0-incubating-SNAPSHOT.jar "PrequentialEvaluation -l classifiers.ensemble.Bagging -s (ArffFileStream -f covtypeNorm.arff) -f 100000"

But the execution fails and I get these errors:

bin/samoa storm target/SAMOA-Storm-0.4.0-incubating-SNAPSHOT.jar "PrequentialEvaluation -l classifiers.ensemble.Bagging -s (ArffFileStream -f covtypeNorm.arff) -f 100000"
bin/samoa
Deploying to STORM
Exception in thread "main" java.lang.NoClassDefFoundError: backtype/storm/topology/TopologyBuilder
    at org.apache.samoa.topology.impl.StormTopology.<init>(StormTopology.java:40)
    at org.apache.samoa.topology.impl.StormComponentFactory.createTopology(StormComponentFactory.java:64)
    at org.apache.samoa.topology.TopologyBuilder.initTopology(TopologyBuilder.java:87)
    at org.apache.samoa.topology.TopologyBuilder.initTopology(TopologyBuilder.java:71)
    at org.apache.samoa.tasks.PrequentialEvaluation.setFactory(PrequentialEvaluation.java:193)
    at org.apache.samoa.topology.impl.StormSamoaUtils.argsToTopology(StormSamoaUtils.java:82)
    at org.apache.samoa.LocalStormDoTask.main(LocalStormDoTask.java:61)
Caused by: java.lang.ClassNotFoundException: backtype.storm.topology.TopologyBuilder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

Can anyone help me?

PS: Sorry for any errors (including formatting errors!), but I'm new in this field (even in StackOverflow!) :)

Thanks in advance.

1

There are 1 best solutions below

0
YaRiK On

Please make sure your cluster and all library dependencies are on the same version . Storm 1.0 changed package names so code that relies on Storm core as provided library will fail. If storm cluster is.10 all code should use.10 if 1.0 then all should be on 1.0