I'm following this tutorial: https://docs.microsoft.com/en-us/azure/hdinsight/storm/apache-storm-develop-java-topology
What I've done so far is
- maven setting
- vi *.java files (in src/main/java/com/microsoft/example directory)
- mvn compile
- jar cf storm.jar *.class (in target/classes/com/microsoft/example directory)
- RandomSentenceSpout.class SplitSentence.class WordCount.class WordCountTopology.class
- The above 4 files were used to make storm.jar file
Then, I tried
storm jar ./storm.jar com.microsoft.example.WordCountTopology WordCountTopology
storm jar ./storm.jar WordCountTopology
, but both of these failed, saying:
Error: Could not find or load main class com.microsoft.example.WordCountTopology
Error: Could not find or load main class WordCountTopology
According to a document, it says
Syntax: storm jar topology-jar-path class ...
Runs the main method of class with the specified arguments. The storm jars and configs in ~/.storm are put on the classpath. The process is configured so that StormSubmitter will upload the jar at topology-jar-path when the topology is submitted.
I cannot find where to fix.
How can I resolve this?