java.lang.ClassNotFoundException: TopologyMain

后端 未结 1 436
滥情空心
滥情空心 2021-01-03 01:23

I am trying to submit a simple word count topology to my local storm cluster. First, i tried using maven and then using storm command line client. I created the JAR file usi

相关标签:
1条回答
  • 2021-01-03 02:06

    Naresh, based on what I see the solution to your problem may lie in the class name you used. Here is the command line argument you specified:

    storm jar TopologyMain.jar TopologyMain wordcount
    

    You refer to your main class as "TopologyMain" using only the class name rather than the fully qualified name. Here is my revision of your storm command line attempt:

    storm jar TopologyMain.jar com.test.newpackage.TopologyMain
    

    I use the full package name instead of just the class by itself. Note that I also removed the reference to "wordcount" because I don't know what it's doing there (there are no classes, methods, or variables called "wordcount" in your code sample).

    Here is an excellent article on Google groups which covers early setup problems with Storm: early setup question

    I found myself using this article for the first couple of weeks when I started using Storm.

    Please let us know if this solves your problem.

    0 讨论(0)
提交回复
热议问题