gpt4 book ai didi

java - 运行 Storm Topology 时找不到主类

转载 作者:搜寻专家 更新时间:2023-11-01 03:23:30 26 4
gpt4 key购买 nike

我正在使用 storm jar 类将拓扑提交给 `nimbus'。它在本地工作正常但在远程集群上它说它无法加载主类。下面是错误

stderr: SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/storm-0.9.0.1/lib/logback-classic-1.0.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tmp/storm-starter.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Error: Could not find or load main class ExclamationTopology

我在 CLI 上运行以下命令:

usr/local/storm/bin/storm jar /tmp/storm-starter.jar ExclamationTopology

最佳答案

对我来说这是一个类路径问题。一旦我遍历到 jar 所在的目录,并运行命令,一切正常。

从 storm 主文件夹运行

./bin/storm jar examples/storm-starter/storm-starter-topologies-0.9.3.jar storm.starter.WordCountTopology TOne

Failed with error: Error: Could not find or load main class storm.starter.WordCountTopology

Running from directory examples/storm-starter

/root/storm/apache-storm-0.10.0/bin/storm jar storm-starter-topologies-0.10.0.jar storm.starter.WordCountTopology TOne

工作正常。

关于java - 运行 Storm Topology 时找不到主类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22046988/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com