我正在關注https://github.com/apache/storm/tree/master/examples/storm-starter。我在我的VMWare上使用Ubuntu 14.04 LTS。沒有問題的java順利-D storm.topology = storm.starter.RollingTopWords在/家庭/用戶/風暴/示例/風暴起動目錄:Ubuntu Apache Storm jar錯誤:無法找到或加載主類storm.starter
我可以運行MVN EXEC鍵。但是我無法在Apache Storm中運行它。
我在/家庭/用戶/風暴/例子/風暴啓動目錄有風暴起動器拓撲-0.9.3.jar。 我也有風暴起動0.9.3.ja [R & 風暴啓動-0.9.3-JAR-與-dependencies.jar在我/家庭/用戶/風暴/例子/風暴起動/目標目錄。
下面是我在/家庭/用戶/風暴/ bin中嘗試過的命令目錄:
./storm jar storm-starter-*.jar storm.starter.RollingTopWords
./storm jar storm-starter-0.9.3-jar-with-dependencies.jar storm.starter.RollingTopWords
./storm jar storm-starter-jar-with-dependencies.jar storm.starter.RollingTopWords
./storm jar storm-starter-topologies-0.9.3.jar storm.starter.RollingTopWords
與拓撲名稱:
./storm jar storm-starter-0.9.3-jar-with-dependencies.jar storm.starter.RollingTopWords slidingWindowCounts
./storm jar storm-starter-jar-with-dependencies.jar storm.starter.RollingTopWords slidingWindowCounts
./storm jar storm-starter-topologies-0.9.3.jar storm.starter.RollingTopWords slidingWindowCounts
./storm jar storm-starter-0.9.3-jar storm.starter.RollingTopWords slidingWindowCounts
全部結束了同樣的錯誤: 錯誤:無法找到或加載主類storm.starter.RollingTopWords。
我所有的類是在/家庭/用戶/風暴/例子/風暴起動/目標/班/風暴/起動目錄 的RollingTopWords.class出現在該目錄中。
我應該如何解決這個問題?詳細的解決方案將會有所幫助。
問題解決。出現這個問題的原因是風暴罐在不正確的目錄下運行。它應該在/ home/user/storm/examples/storm-starter/target目錄下運行,因爲我的storm-starter-0.9.3-jar-with-dependencies.jar位於該目錄中。 – Toshihiko