apache storm:无法加载主类org.apache.storm.starter.惊呼本体论

3df52oht  于 2021-06-21  发布在  Storm
关注(0)|答案(2)|浏览(277)

首先,我已经提到了不少类似的问题,但仍然未能解决它。我已经正确安装了nimbus和supervisor,没有错误,而“make install”甚至maven clean install和compile都没有错误,即使我的0qm是用jzmq正确设置的,我的nimbus也是通过./storm nimbus启动的,我的supervisor是通过./storm supervisor启动的,但是当我这样做的时候
./storm jar~/ccbd-work/storm2/examples/target/storm-starter-topologies-0.10.0.jar org.apache.storm.starter.惊呼拓扑
我得到以下错误
运行:/usr/lib/jvm/java-7-openjdk-amd64/bin/java-client-ddaemon.name=-dstorm.options=-dstorm.home=/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0-dstorm.log.dir=/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/logs-djava.library.path=/usr/local-dstorm.conf.file=-cp/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-core-2.1.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/slf4j-api-1.7.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-over-slf4j-1.6.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/asm-4.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0。10.0/lib/reflectasm-1.07-shaded.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/minlog-1.2.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/kryo-2.21.jar:/home/hubatrix/ccbd-work/storm2.10.0/lib/disruptor-2.10.4.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/servlet-api-2.5.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/hadoop-auth-2.4.0.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-api-2.1.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-slf4j-impl-2.1.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/clojure-1.6.0.jar:/home/hubatrix/ccbd-work/storm-0.10/lib/storm-core-0.10.0.jar:/home/hubatrix/ccbd-work/storm2/examples/target/storm-starter-topologies-0.10.0.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/bin-dstorm.jar=/home/hubatrix/ccbd-work/storm2/examples/target/storm-starter-topologies-0.10.jarorg.apache.storm.starter.惊呼本体论错误:无法找到或加载主类org.apache.storm.starter.惊呼本体论
我做错什么了?请帮助我解决这个问题,而且我正在运行这个是在本地计算机和我的风暴.yaml配置正确。
这是我的storm2文件结构http://paste.linux.chat/view/e4424189 如果我在定义它的时候做错了什么,请纠正我。
作为马蒂亚斯j。sax提到我的jar文件有问题,但不知道问题是jar文件(拓扑)本身还是我刚从中下载新jar文件的路径https://dl.dropboxusercontent.com/s/kc933u6vz2crqkb/storm-starter-0.0.1-snapshot-jar-with-dependencies.jar 然后跑了
./storm jar~/ccbd work/storm2/storm-starter-0.0.1-snapshot-jar-with-dependencies.jar storm.starter.wordcounttopology wordcount-c nimbus.host=localhost
就像走进蛋糕一样,再次感谢你的回应

uttx8gqw

uttx8gqw1#

我也遇到了这个问题,困惑了两天。然后我发现是错误的文件夹问题。解决方法其实很简单。您不需要在前面添加“org.apache.storm.starter”。这意味着您所需要做的就是将cd刻录到starter文件夹,然后运行“storm jar~/ccbd work/storm2/examples/target/storm-starter-topologies-0.10.0.jar惊呼拓扑”。这就是全部。然后你可以在localhost:8080. 祝你好运!

8hhllhi2

8hhllhi22#

它不在正确的文件夹中:错误消息显示“org.apache.storm.starter.惊呼本体论”,但类文件位于文件夹“storm/starter”中(在java中,包名必须与目录结构对齐。) ExclamationTopology 已从包中移动 storm.starterorg.apache.storm.starter 最近。在版本0.10.0中,它仍然处于 storm.starter . 因此,您需要通过

./storm jar ~/ccbd-work/storm2/examples/target/storm-starter-topologies-0.10.0.jar storm.starter.ExclamationTopology

相关问题