Apache的风暴 - 在风暴首发的ClassNotFoundException [英] Apache Storm - ClassNotFoundException on storm-starter

查看:269
本文介绍了Apache的风暴 - 在风暴首发的ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让风暴启动上班。我尝试了邮件列表,这似乎并不能获得牵引力。当我运行以下命令:

I’m trying to get the storm-starter to work. I tried the mailing list, and that does not seem to be gaining traction. When I run the following:

$ mvn compile exec:java -Dstorm.topology=storm.starter.ExclamationTopology

我得到一个错误

Error on initialization of server mk-worker
java.lang.RuntimeException: java.lang.ClassNotFoundException: backtype.storm.testing.TestWordSpout

我不是一个Java开发人员,所以我不知道进口究竟应该如何工作。我看到风暴核心/ src目录/ JVM / backtype /风暴/测试/ TestWordSpout.java

当我发现任何jar文件,我看到:

When I find any jar files, I see:

./target/original-storm-starter-0.11.0-SNAPSHOT.jar
./target/storm-starter-0.11.0-SNAPSHOT.jar

当我检查这些jar文件, TestWordSpout 是不存在的。我从运行我的命令 ./例子/风暴启动按照上面链接的文档。

When I inspect those jar files, TestWordSpout is not there. I am running my commands from ./examples/storm-starter as per the documentation linked above.

要尽我所知,我已经按照本教程完全相同。 OSX埃尔卡皮坦10.11.2,Java的1.8.0,0.9.5风暴,Maven的3.3.3。任何帮助将是巨大的;我喜欢能够上手:)

To the best of my knowledge, I've followed the tutorial exactly. OSX El Capitan 10.11.2, Java 1.8.0, Storm 0.9.5., Maven 3.3.3. Any help would be great; I’d enjoy being able to get started :)

推荐答案

通过Maven的运行暴风拓扑是不是要走的路。您应该使用斌/瓶风暴与myJarFile.jar 在命令行提交拓扑集群(它也为本地模式运行)。

Running a Storm Topology via maven is not the way to go. You should use bin/storm jar myJarFile.jar on command line to submit a topology to a cluster (which does also work for local mode).

中的文件 ./目标/原装风暴起动-0.11.0-SNAPSHOT.jar ./目标/风暴starter- 0.11.0-SNAPSHOT.jar 是标准的Maven工件,不能用于提交拓扑集群。

The files ./target/original-storm-starter-0.11.0-SNAPSHOT.jar and ./target/storm-starter-0.11.0-SNAPSHOT.jar are standard maven artifacts and cannot be used to submit a topology to a cluster.

您可以使用的maven-JAR-插件(我会建议上手 - 你可能需要使用 Maven的依赖关系的插件,太), Maven的组装插件 Maven的遮阳插件来组装一个正确提交jar`文件。有一堆关于这太问题,所以我不会在这里包括进一步的细节。举一个例子,你可以看看到我的Git仓库 https://开头github.com/mjsax/aeolus/blob/master/monitoring/pom.xml

You can use maven-jar-plugin (which I would recommend to get started -- you might need to use maven-dependency-plugin, too),maven-assembly-plugin, ormaven-shade-pluginto assembly a correctjar` file for submission. There is a bunch of SO question about this so I will not include further details here. For an example you can have a look into my git repository at https://github.com/mjsax/aeolus/blob/master/monitoring/pom.xml

这篇关于Apache的风暴 - 在风暴首发的ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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