Apache Storm:无法加载主类 org.apache.storm.starter.ExclamationTopology [英] Apache storm : Could not load main class org.apache.storm.starter.ExclamationTopology

查看:51
本文介绍了Apache Storm:无法加载主类 org.apache.storm.starter.ExclamationTopology的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先我已经提到了很多类似的问题,但仍然无法解决.我已经正确安装了 nimbus 和 supervisor 并且没有错误,而make install"甚至 maven clean install 和 compile 都没有错误,甚至我的 0qm 是用 jzmq 正确设置的,并且还通过 ./storm nimbus 启动了我的 nimbus 和/storm supervisor 开始了我的主管,但是当我这样做时

firstly I already referred quite a few similar questions but still haven't been able to fix it. I have installed nimbus and supervisor properly and there were no errors while "make install" even maven clean install and compile had no errors at all, even my 0qm is set up properly with jzmq, and also started my nimbus by ./storm nimbus and started my supervisor by ./storm supervisor but when I do

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

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

我收到以下错误

运行:/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.7.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-over-slf4j-1.6.6.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/asm-4.0.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/apache-storm-0.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/storm2/apache-storm-0.10.0/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/conf:/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.0.jar org.apache.storm.starter.ExclamationTopology错误:无法找到或加载主类 org.apache.storm.starter.ExclamationTopology

Running: /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.7.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/log4j-over-slf4j-1.6.6.jar:/home/hubatrix/ccbd-work/storm2/apache-storm-0.10.0/lib/asm-4.0.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/apache-storm-0.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/storm2/apache-storm-0.10.0/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/conf:/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.0.jar org.apache.storm.starter.ExclamationTopology Error: Could not find or load main class org.apache.storm.starter.ExclamationTopology

我在这里做错了什么?请帮我解决这个问题而且我在本地机器上运行它并且我的storm.yaml配置正确.

what am I doing wrong here? Please help me fix this and also I am running this is on a local machine and my storm.yaml is configured properly.

这是我的storm2文件结构http://paste.linux.chat/view/e4424189 如果我在定义正确的时候做错了什么.

here is my file structure of storm2 http://paste.linux.chat/view/e4424189 if at all I am doing anything wrong in defining correct me from it.

我的每一个设置都正确到最后,因为 Matthias J. Sax 提到我的 jar 文件有问题,但我真的不知道问题是 jar 文件(拓扑)本身还是我刚刚下载一个新 jar 文件的路径https://dl.dropboxusercontent.com/s/kc933u6vz2crqkb/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar 并运行

My every setup was right till the end as Matthias J. Sax mentioned I had issues with my jar file, but dont really know if the issue was jar file(topology) itself or the path I just download a new jar file from https://dl.dropboxusercontent.com/s/kc933u6vz2crqkb/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar and ran

./storm jar ~/ccbd-work/storm2/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jarstorm.starter.WordCountTopology WordCount -c nimbus.host=localhost

./storm jar ~/ccbd-work/storm2/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.WordCountTopology WordCount -c nimbus.host=localhost

它就像走进蛋糕一样工作,再次感谢您的回应

and it worked like walk in a cake, thanks again for the response

推荐答案

它不在正确的文件夹中:错误消息显示org.apache.storm.starter.ExclamationTopology"但类文件在文件夹storm/起动机".(在 Java 中,包名必须与目录结构一致.)

It is not in the correct folder: the error messages says "org.apache.storm.starter.ExclamationTopology" but the class file is in folder "storm/starter". (In Java, package names must align with directory structure.)

ExclamationTopology 最近从包 storm.starter 移动到 org.apache.storm.starter.在 0.10.0 版本中,它仍然在 storm.starter 中.因此,您需要通过

ExclamationTopology was moved from package storm.starter to org.apache.storm.starter recently. In version 0.10.0 it is still in storm.starter. Thus, you need to submit your topology via

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

这篇关于Apache Storm:无法加载主类 org.apache.storm.starter.ExclamationTopology的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆