2
votes

I'm trying to debug very simple topology (1 spout 1 bolt)

public class JoinerTopologyTest {

public static void main(String[] args) throws IOException {
    Config conf = new Config();
    conf.setNumWorkers(5);
    conf.setDebug(true);

    TopologyBuilder builder = new TopologyBuilder();
    builder.setSpout("SPOUT-1",new MySpout(),1);
    builder.setBolt("BOLT-1",new Bolt1(), 3)
            .shuffleGrouping("SPOUT-1");
    //builder.setBolt("JOINER", new JoinerBolt(),1)
    //        .shuffleGrouping("BOLT-1")
    //        .shuffleGrouping("SPOUT-1","str1");

    final LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("TOPO1",conf,builder.createTopology());


    System.in.read();

    cluster.shutdown();
}

}

But when i run it from InteliJ IDEA i get:

java.lang.RuntimeException: java.lang.ClassNotFoundException: com.pixonic.zephyr.compaction.tests.Bolt1 at org.apache.storm.utils.Utils.javaDeserialize(Utils.java:181) ~[storm-core-1.0.1.jar:1.0.1] at org.apache.storm.utils.Utils.getSetComponentObject(Utils.java:430) ~[storm-core-1.0.1.jar:1.0.1]

and

[Thread-15] ERROR o.a.s.d.worker - Error on initialization of server mk-worker java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.storm.daemon.acker at org.apache.storm.utils.Utils.javaDeserialize(Utils.java:181) ~[storm-core-1.0.1.jar:1.0.1] at org.apache.storm.utils.Utils.getSetComponentObject(Utils.java:430) ~[storm-core-1.0.1.jar:1.0.1]

but same topology runs well in Cluster mode. PS in my pom.xml in debug mode i have:

    <dependency>
        <groupId>org.apache.storm</groupId>
        <artifactId>storm-core</artifactId>
        <version>1.0.1</version>
        <scope>compile</scope>
    </dependency>

EDIT

project to reproduce bug: https://github.com/holinov/storm-101-localcluster/tree/master

1
Why do you put "solved" and not actually answer the question by yourself?Matthias J. Sax

1 Answers

0
votes

posting it here as asked in comments

SOLVED

To run or debug Topology in IDEA don't use maven runner. Just right click on topology class and choose Debug->JoinerTopologyTest...main() that does not have MVN icon